All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: dwc2: fix USB core dependencies
@ 2015-01-28 21:49 Arnd Bergmann
  2015-01-29 16:24 ` Felipe Balbi
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2015-01-28 21:49 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

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
 
 config USB_DWC2_HOST
 	bool "Host only mode"
-	depends on USB
+	depends on USB=y || (USB_DWC2=m && USB)
 	help
 	  The Designware USB2.0 high-speed host controller
 	  integrated into many SoCs. Select this option if you want the
@@ -42,7 +42,7 @@ config USB_DWC2_PERIPHERAL
 
 config USB_DWC2_DUAL_ROLE
 	bool "Dual Role mode"
-	depends on (USB=y || USB=USB_DWC2) && (USB_GADGET=y || USB_GADGET=USB_DWC2)
+	depends on (USB=y && USB_GADGET=y) || (USB_DWC2=m && USB && USB_GADGET)
 	help
 	  Select this option if you want the driver to work in a dual-role
 	  mode. In this mode both host and gadget features are enabled, and

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] usb: dwc2: fix USB core dependencies
  2015-01-28 21:49 [PATCH] usb: dwc2: fix USB core dependencies Arnd Bergmann
@ 2015-01-29 16:24 ` Felipe Balbi
  2015-01-30  2:12   ` John Youn
  0 siblings, 1 reply; 3+ messages in thread
From: Felipe Balbi @ 2015-01-29 16:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Adding John

On Wed, Jan 28, 2015 at 10:49:00PM +0100, Arnd Bergmann wrote:
> 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.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> 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
>  
>  config USB_DWC2_HOST
>  	bool "Host only mode"
> -	depends on USB
> +	depends on USB=y || (USB_DWC2=m && USB)
>  	help
>  	  The Designware USB2.0 high-speed host controller
>  	  integrated into many SoCs. Select this option if you want the
> @@ -42,7 +42,7 @@ config USB_DWC2_PERIPHERAL
>  
>  config USB_DWC2_DUAL_ROLE
>  	bool "Dual Role mode"
> -	depends on (USB=y || USB=USB_DWC2) && (USB_GADGET=y || USB_GADGET=USB_DWC2)
> +	depends on (USB=y && USB_GADGET=y) || (USB_DWC2=m && USB && USB_GADGET)
>  	help
>  	  Select this option if you want the driver to work in a dual-role
>  	  mode. In this mode both host and gadget features are enabled, and
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150129/7e1024a9/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] usb: dwc2: fix USB core dependencies
  2015-01-29 16:24 ` Felipe Balbi
@ 2015-01-30  2:12   ` John Youn
  0 siblings, 0 replies; 3+ messages in thread
From: John Youn @ 2015-01-30  2:12 UTC (permalink / raw)
  To: linux-arm-kernel

On 01/29/2015 08:25 AM, Felipe Balbi wrote:
> Hi,
> 
> Adding John
> 
> On Wed, Jan 28, 2015 at 10:49:00PM +0100, Arnd Bergmann wrote:
>> 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.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>
>> 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
>>  
>>  config USB_DWC2_HOST
>>  	bool "Host only mode"
>> -	depends on USB
>> +	depends on USB=y || (USB_DWC2=m && USB)
>>  	help
>>  	  The Designware USB2.0 high-speed host controller
>>  	  integrated into many SoCs. Select this option if you want the
>> @@ -42,7 +42,7 @@ config USB_DWC2_PERIPHERAL
>>  
>>  config USB_DWC2_DUAL_ROLE
>>  	bool "Dual Role mode"
>> -	depends on (USB=y || USB=USB_DWC2) && (USB_GADGET=y || USB_GADGET=USB_DWC2)
>> +	depends on (USB=y && USB_GADGET=y) || (USB_DWC2=m && USB && USB_GADGET)
>>  	help
>>  	  Select this option if you want the driver to work in a dual-role
>>  	  mode. In this mode both host and gadget features are enabled, and
>>
>>

Acked-by: John Youn <johnyoun@synopsys.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-30  2:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-28 21:49 [PATCH] usb: dwc2: fix USB core dependencies Arnd Bergmann
2015-01-29 16:24 ` Felipe Balbi
2015-01-30  2:12   ` John Youn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.