@@ -894,6 +894,7 @@ config ARCH_ZYNQMP_R5
select DM_SERIAL
select OF_CONTROL
imply CMD_DM
+ imply DM_USB_DEV
config ARCH_ZYNQMP
bool "Xilinx ZynqMP based platform"
@@ -909,6 +910,7 @@ config ARCH_ZYNQMP
select SUPPORT_SPL
imply CMD_DM
imply FAT_WRITE
+ imply DM_USB_DEV
config TEGRA
bool "NVIDIA Tegra"
@@ -47,6 +47,12 @@ config DM_USB
declared with the U_BOOT_USB_DEVICE() macro and will be
automatically probed when found on the bus.
+config DM_USB_DEV
+ bool "Enable driver model for USB (Peripheral mode)"
+ depends on DM_USB
+ help
+ Enable driver model for USB (Peripheral mode).
+
source "drivers/usb/host/Kconfig"
source "drivers/usb/dwc3/Kconfig"
@@ -789,7 +789,7 @@ MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("DesignWare USB3 DRD Controller Driver");
-#ifdef CONFIG_DM_USB
+#ifdef CONFIG_DM_USB_DEV
int dwc3_init(struct dwc3 *dwc)
{
@@ -21,7 +21,7 @@
#include "gadget.h"
#include "linux-compat.h"
-DECLARE_GLOBAL_DATA_PTR;
+#ifdef CONFIG_DM_USB_DEV
int usb_gadget_handle_interrupts(int index)
{
@@ -98,6 +98,8 @@ U_BOOT_DRIVER(dwc3_generic_peripheral) = {
.flags = DM_FLAG_ALLOC_PRIV_DMA,
};
+#endif
+
static int dwc3_generic_bind(struct udevice *parent)
{
const void *fdt = gd->fdt_blob;