diff options
author | Kunihiko Hayashi <hayashi.kunihiko@socionext.com> | 2021-05-12 17:11:14 +0300 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2021-05-16 20:01:45 +0300 |
commit | a5f9be1ed5a5e3a89478edd2f544e667046cd5ea (patch) | |
tree | 986a3475baf9be67b01681b2bb30e8bbddf4ab5b /drivers/usb/dwc3/dwc3-generic.c | |
parent | 1027f28bd4be8c78eff1dd8d9261ebe01016943a (diff) | |
download | u-boot-a5f9be1ed5a5e3a89478edd2f544e667046cd5ea.tar.xz |
usb: dwc3-generic: Disable host driver definition if gadget only
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>
Diffstat (limited to 'drivers/usb/dwc3/dwc3-generic.c')
-rw-r--r-- | drivers/usb/dwc3/dwc3-generic.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c index 30f835e1e3..c8bf4ae851 100644 --- a/drivers/usb/dwc3/dwc3-generic.c +++ b/drivers/usb/dwc3/dwc3-generic.c @@ -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; |