]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: dwc3-generic: Disable host driver definition if gadget only
authorKunihiko Hayashi <hayashi.kunihiko@socionext.com>
Wed, 12 May 2021 14:11:14 +0000 (23:11 +0900)
committerMarek Vasut <marex@denx.de>
Sun, 16 May 2021 17:01:45 +0000 (19:01 +0200)
Even if only USB gadget is defined, dwc3 generic driver enables
a definition and probe/remove functions for host driver.

This enables the definition if USB_HOST is enabled only.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
drivers/usb/dwc3/dwc3-generic.c

index 30f835e1e3d01de4278051eb7d24f102b4e40541..c8bf4ae851fe47db1fd99905fb5d1a9a8078da43 100644 (file)
@@ -163,7 +163,8 @@ U_BOOT_DRIVER(dwc3_generic_peripheral) = {
 };
 #endif
 
-#if defined(CONFIG_SPL_USB_HOST_SUPPORT) || !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_SPL_USB_HOST_SUPPORT) || \
+       !defined(CONFIG_SPL_BUILD) && defined(CONFIG_USB_HOST)
 static int dwc3_generic_host_probe(struct udevice *dev)
 {
        struct xhci_hcor *hcor;