diff options
author | Arnd Bergmann <arnd@arndb.de> | 2015-01-28 16:49:00 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-01-30 11:36:44 -0500 |
commit | b7974de821bb65a7efe1961a600c850b5029ed6d (patch) | |
tree | 826eaf110a2901b27405c48ce7f25a33a1dc90c1 /drivers/usb/dwc2/Kconfig | |
parent | ffb9da65755815611010e07ad1c937858f226cb2 (diff) |
usb: dwc2: fix USB core dependencies
It is currently possible to configure the dwc2 driver as built-in
when host mode or dual-role is enabled, but the USB core is
a loadable module. This leads to a link failure:
drivers/built-in.o: In function `_dwc2_hcd_start':
:(.text+0x84538): undefined reference to `usb_hcd_resume_root_hub'
drivers/built-in.o: In function `_dwc2_hcd_urb_dequeue':
:(.text+0x84aa0): undefined reference to `usb_hcd_check_unlink_urb'
:(.text+0x84e4c): undefined reference to `usb_hcd_unlink_urb_from_ep'
:(.text+0x84e74): undefined reference to `usb_hcd_giveback_urb'
drivers/built-in.o: In function `dwc2_assign_and_init_hc':
:(.text+0x86b98): undefined reference to `usb_hcd_unmap_urb_for_dma'
drivers/built-in.o: In function `_dwc2_hcd_urb_enqueue':
:(.text+0x8717c): undefined reference to `usb_hcd_link_urb_to_ep'
:(.text+0x872f4): undefined reference to `usb_hcd_unlink_urb_from_ep'
drivers/built-in.o: In function `dwc2_host_complete':
:(.text+0x875d4): undefined reference to `usb_hcd_unlink_urb_from_ep'
:(.text+0x87600): undefined reference to `usb_hcd_giveback_urb'
drivers/built-in.o: In function `dwc2_hcd_init':
:(.text+0x87ba8): undefined reference to `usb_disabled'
:(.text+0x87d38): undefined reference to `usb_create_hcd'
:(.text+0x88094): undefined reference to `usb_add_hcd'
:(.text+0x880dc): undefined reference to `usb_put_hcd'
drivers/built-in.o: In function `dwc2_hcd_remove':
:(.text+0x8821c): undefined reference to `usb_remove_hcd'
:(.text+0x8823c): undefined reference to `usb_put_hcd'
drivers/built-in.o: In function `dwc2_hc_handle_tt_clear.isra.10':
:(.text+0x88e2c): undefined reference to `usb_hub_clear_tt_buffer'
drivers/built-in.o: In function `dwc2_hcd_qtd_add':
:(.text+0x8b554): undefined reference to `usb_calc_bus_time'
To fix the problem, this patch changes the dependencies so that
dwc2 host mode can only be enabled if either the USB core is
built-in or both USB and dwc2 are modules.
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc2/Kconfig')
-rw-r--r-- | drivers/usb/dwc2/Kconfig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/dwc2/Kconfig b/drivers/usb/dwc2/Kconfig index b323c4c11b0a..76b9ba4dc925 100644 --- a/drivers/usb/dwc2/Kconfig +++ b/drivers/usb/dwc2/Kconfig | |||
@@ -23,7 +23,7 @@ choice | |||
23 | 23 | ||
24 | config USB_DWC2_HOST | 24 | config USB_DWC2_HOST |
25 | bool "Host only mode" | 25 | bool "Host only mode" |
26 | depends on USB | 26 | depends on USB=y || (USB_DWC2=m && USB) |
27 | help | 27 | help |
28 | The Designware USB2.0 high-speed host controller | 28 | The Designware USB2.0 high-speed host controller |
29 | integrated into many SoCs. Select this option if you want the | 29 | integrated into many SoCs. Select this option if you want the |
@@ -42,7 +42,7 @@ config USB_DWC2_PERIPHERAL | |||
42 | 42 | ||
43 | config USB_DWC2_DUAL_ROLE | 43 | config USB_DWC2_DUAL_ROLE |
44 | bool "Dual Role mode" | 44 | bool "Dual Role mode" |
45 | depends on (USB=y || USB=USB_DWC2) && (USB_GADGET=y || USB_GADGET=USB_DWC2) | 45 | depends on (USB=y && USB_GADGET=y) || (USB_DWC2=m && USB && USB_GADGET) |
46 | help | 46 | help |
47 | Select this option if you want the driver to work in a dual-role | 47 | Select this option if you want the driver to work in a dual-role |
48 | mode. In this mode both host and gadget features are enabled, and | 48 | mode. In this mode both host and gadget features are enabled, and |