diff options
author | Jean-Jacques Hiblot <jjhiblot@ti.com> | 2018-11-29 12:52:42 +0300 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2018-12-07 18:31:45 +0300 |
commit | 687ab54560809e01a10652ef82dbac6ae72deb91 (patch) | |
tree | 4bd2cfa92b1b2cd30e895041c6c43a8afc13afee /drivers/usb/dwc3 | |
parent | a06955ae1ef2a942f18025d4fefceea2c638a76f (diff) | |
download | u-boot-687ab54560809e01a10652ef82dbac6ae72deb91.tar.xz |
usb: introduce a separate config option for DM USB device
Using CONFIG_DM_USB for this purpose prevents using DM_USB for host and not
for device.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/core.c | 3 | ||||
-rw-r--r-- | drivers/usb/dwc3/dwc3-generic.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index f1ca6191ce..f9d84657c8 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -789,8 +789,7 @@ MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>"); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("DesignWare USB3 DRD Controller Driver"); -#if CONFIG_IS_ENABLED(DM_USB) - +#if CONFIG_IS_ENABLED(DM_USB_GADGET) int dwc3_init(struct dwc3 *dwc) { int ret; diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c index 56c9fd657f..ad3a116b3e 100644 --- a/drivers/usb/dwc3/dwc3-generic.c +++ b/drivers/usb/dwc3/dwc3-generic.c @@ -21,8 +21,7 @@ #include "gadget.h" #include "linux-compat.h" -DECLARE_GLOBAL_DATA_PTR; - +#if CONFIG_IS_ENABLED(DM_USB_GADGET) int usb_gadget_handle_interrupts(int index) { struct dwc3 *priv; @@ -97,6 +96,7 @@ U_BOOT_DRIVER(dwc3_generic_peripheral) = { .priv_auto_alloc_size = sizeof(struct dwc3), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; +#endif static int dwc3_generic_bind(struct udevice *parent) { |