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

usb: fsl: drop USB_FSL_MPH_DR_OF Kconfig symbol

The USB_FSL_MPH_DR_OF symbol is used to ensure the code that interprets
the DR device node is built whenever one of the two drivers (EHCI or
UDC) for the platform is enabled. However, if CONFIG_USB is disabled
and we only support gadget mode, this causes a Kconfig warning:

warning: (USB_FSL_USB2) selects USB_FSL_MPH_DR_OF which has unmet direct dependencies (USB_SUPPORT && USB)

We can avoid this warning by simply no longer using the symbol,
and making sure we enter the drivers/usb/host/ directory when
the UDC driver is enabled that needs the file, and then we use
Makefile syntax to ensure the file is built-in if needed.

There is currently a dependency on CONFIG_OF, but this is redundant,
as we already know that this is set unconditionally for the platforms
that use this driver.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Felipe Balbi <balbi@kernel.org>

authored by

Arnd Bergmann and committed by
Felipe Balbi
d0fc35bc 65bc0fba

+3 -7
+1 -1
drivers/usb/Makefile
··· 26 26 obj-$(CONFIG_USB_R8A66597_HCD) += host/ 27 27 obj-$(CONFIG_USB_HWA_HCD) += host/ 28 28 obj-$(CONFIG_USB_IMX21_HCD) += host/ 29 - obj-$(CONFIG_USB_FSL_MPH_DR_OF) += host/ 29 + obj-$(CONFIG_USB_FSL_USB2) += host/ 30 30 obj-$(CONFIG_USB_FOTG210_HCD) += host/ 31 31 obj-$(CONFIG_USB_MAX3421_HCD) += host/ 32 32
-1
drivers/usb/gadget/udc/Kconfig
··· 74 74 config USB_FSL_USB2 75 75 tristate "Freescale Highspeed USB DR Peripheral Controller" 76 76 depends on FSL_SOC || ARCH_MXC 77 - select USB_FSL_MPH_DR_OF if OF 78 77 help 79 78 Some of Freescale PowerPC and i.MX processors have a High Speed 80 79 Dual-Role(DR) USB controller, which supports device mode.
-4
drivers/usb/host/Kconfig
··· 125 125 126 126 If unsure, say Y. 127 127 128 - config USB_FSL_MPH_DR_OF 129 - tristate 130 - 131 128 if USB_EHCI_HCD 132 129 133 130 config USB_EHCI_PCI ··· 157 160 tristate "Support for Freescale PPC on-chip EHCI USB controller" 158 161 depends on FSL_SOC 159 162 select USB_EHCI_ROOT_HUB_TT 160 - select USB_FSL_MPH_DR_OF if OF 161 163 ---help--- 162 164 Variation of ARC USB block used in some Freescale chips. 163 165
+2 -1
drivers/usb/host/Makefile
··· 74 74 obj-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o 75 75 obj-$(CONFIG_USB_HWA_HCD) += hwa-hc.o 76 76 obj-$(CONFIG_USB_IMX21_HCD) += imx21-hcd.o 77 - obj-$(CONFIG_USB_FSL_MPH_DR_OF) += fsl-mph-dr-of.o 77 + obj-$(CONFIG_USB_FSL_USB2) += fsl-mph-dr-of.o 78 + obj-$(CONFIG_USB_EHCI_FSL) += fsl-mph-dr-of.o 78 79 obj-$(CONFIG_USB_EHCI_FSL) += ehci-fsl.o 79 80 obj-$(CONFIG_USB_HCD_BCMA) += bcma-hcd.o 80 81 obj-$(CONFIG_USB_HCD_SSB) += ssb-hcd.o