Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "usb: dwc2: Update Kconfig to support dual-role"

This reverts commit e006fee6ecfed5b957bdd41c236aad751ab29042.

This patch causes build break. Modifications in Makefile and Kconfig have
no connection with driver code.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Robert Baldyga and committed by
Greg Kroah-Hartman
cd686097 8df43857

+37 -47
+27 -36
drivers/usb/dwc2/Kconfig
··· 1 1 config USB_DWC2 2 - tristate "DesignWare USB2 DRD Core Support" 2 + bool "DesignWare USB2 DRD Core Support" 3 3 depends on USB 4 4 help 5 5 Say Y here if your system has a Dual Role Hi-Speed USB 6 6 controller based on the DesignWare HSOTG IP Core. 7 7 8 - If you choose to build the driver as dynamically 9 - linked modules, a single dwc2.ko(regardless of mode of operation) 10 - will get built for both platform IPs and PCI. 8 + For host mode, if you choose to build the driver as dynamically 9 + linked modules, the core module will be called dwc2.ko, the PCI 10 + bus interface module (if you have a PCI bus system) will be 11 + called dwc2_pci.ko, and the platform interface module (for 12 + controllers directly connected to the CPU) will be called 13 + dwc2_platform.ko. For gadget mode, there will be a single 14 + module called dwc2_gadget.ko. 15 + 16 + NOTE: The s3c-hsotg driver is now renamed to dwc2_gadget. The 17 + host and gadget drivers are still currently separate drivers. 18 + There are plans to merge the dwc2_gadget driver with the dwc2 19 + host driver in the near future to create a dual-role driver. 11 20 12 21 if USB_DWC2 13 22 14 - choice 15 - bool "DWC2 Mode Selection" 16 - default USB_DWC2_DUAL_ROLE if (USB && USB_GADGET) 17 - default USB_DWC2_HOST if (USB && !USB_GADGET) 18 - default USB_DWC2_PERIPHERAL if (!USB && USB_GADGET) 19 - 20 23 config USB_DWC2_HOST 21 - bool "Host only mode" 24 + tristate "Host only mode" 22 25 depends on USB 23 26 help 24 27 The Designware USB2.0 high-speed host controller 25 - integrated into many SoCs. Select this option if you want the 26 - driver to operate in Host-only mode. 28 + integrated into many SoCs. 29 + 30 + config USB_DWC2_PLATFORM 31 + bool "DWC2 Platform" 32 + depends on USB_DWC2_HOST 33 + default USB_DWC2_HOST 34 + help 35 + The Designware USB2.0 platform interface module for 36 + controllers directly connected to the CPU. This is only 37 + used for host mode. 27 38 28 39 config USB_DWC2_PCI 29 40 bool "DWC2 PCI" ··· 47 36 comment "Gadget mode requires USB Gadget support to be enabled" 48 37 49 38 config USB_DWC2_PERIPHERAL 50 - bool "Gadget only mode" 51 - depends on USB_GADGET=y || USB_GADGET=USB_DWC2 39 + tristate "Gadget only mode" 40 + depends on USB_GADGET 52 41 help 53 42 The Designware USB2.0 high-speed gadget controller 54 - integrated into many SoCs. Select this option if you want the 55 - driver to operate in Peripheral-only mode. This option requires 56 - USB_GADGET=y. 57 - 58 - config USB_DWC2_DUAL_ROLE 59 - bool "Dual Role mode" 60 - depends on ((USB=y || USB=USB_DWC2) && (USB_GADGET=y || USB_GADGET=USB_DWC2)) 61 - help 62 - Select this option if you want the driver to work in a dual-role 63 - mode. In this mode both host and gadget features are enabled, and 64 - the role will be determined by the cable that gets plugged-in. This 65 - option requires USB_GADGET=y. 66 - endchoice 67 - 68 - config USB_DWC2_PLATFORM 69 - bool 70 - depends on !PCI 71 - default y 72 - help 73 - The Designware USB2.0 platform interface module for 74 - controllers directly connected to the CPU. 43 + integrated into many SoCs. 75 44 76 45 config USB_DWC2_DEBUG 77 46 bool "Enable Debugging Messages"
+10 -11
drivers/usb/dwc2/Makefile
··· 1 1 ccflags-$(CONFIG_USB_DWC2_DEBUG) += -DDEBUG 2 2 ccflags-$(CONFIG_USB_DWC2_VERBOSE) += -DVERBOSE_DEBUG 3 3 4 - obj-$(CONFIG_USB_DWC2) += dwc2.o 4 + obj-$(CONFIG_USB_DWC2_HOST) += dwc2.o 5 5 dwc2-y := core.o core_intr.o 6 - 7 - ifneq ($(filter y,$(CONFIG_USB_DWC2_HOST) $(CONFIG_USB_DWC2_DUAL_ROLE)),) 8 - dwc2-y += hcd.o hcd_intr.o 9 - dwc2-y += hcd_queue.o hcd_ddma.o 10 - endif 11 - 12 - ifneq ($(filter y,$(CONFIG_USB_DWC2_PERIPHERAL) $(CONFIG_USB_DWC2_DUAL_ROLE)),) 13 - dwc2-y += gadget.o 14 - endif 6 + dwc2-y += hcd.o hcd_intr.o 7 + dwc2-y += hcd_queue.o hcd_ddma.o 15 8 16 9 # NOTE: The previous s3c-hsotg peripheral mode only driver has been moved to 17 10 # this location and renamed gadget.c. When building for dynamically linked ··· 19 26 dwc2_pci-y := pci.o 20 27 endif 21 28 22 - dwc2-$(CONFIG_USB_DWC2_PLATFORM) += platform.o 29 + ifneq ($(CONFIG_USB_DWC2_PLATFORM),) 30 + obj-$(CONFIG_USB_DWC2_HOST) += dwc2_platform.o 31 + dwc2_platform-y := platform.o 32 + endif 33 + 34 + obj-$(CONFIG_USB_DWC2_PERIPHERAL) += dwc2_gadget.o 35 + dwc2_gadget-y := gadget.o