linux/drivers/usb/dwc2
Arnd Bergmann b7974de821 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>
2015-01-30 10:36:44 -06:00
..
core_intr.c usb: dwc2: gadget: rework disconnect event handling 2014-11-21 09:07:34 -06:00
core.c usb: dwc2: Fixed a few typos in comments 2015-01-12 12:13:24 -06:00
core.h usb: dwc2: gadget: add reset flag in init function 2015-01-30 10:32:41 -06:00
gadget.c usb: dwc2: gadget: initialize controller in pullup callback 2015-01-30 10:34:19 -06:00
hcd_ddma.c
hcd_intr.c usb: dwc2: handle DMA buffer unmapping sanely 2014-09-19 16:17:58 -07:00
hcd_queue.c usb: dwc2: handle DMA buffer unmapping sanely 2014-09-19 16:17:58 -07:00
hcd.c usb: dwc2: gadget: add reset flag in init function 2015-01-30 10:32:41 -06:00
hcd.h usb: dwc2: Move gadget probe function into platform code 2014-11-14 14:59:32 -06:00
hw.h usb: dwc2: gadget: replace constants with defines 2015-01-30 10:34:11 -06:00
Kconfig usb: dwc2: fix USB core dependencies 2015-01-30 10:36:44 -06:00
Makefile usb: dwc2: Update Kconfig to support dual-role 2014-11-14 15:00:07 -06:00
pci.c usb: dwc2: Update common interrupt handler to call gadget interrupt handler 2014-11-14 14:59:48 -06:00
platform.c usb: dwc2: platform: add generic PHY framework support 2015-01-12 12:13:26 -06:00