Commit b3c518a8 authored by Jean-Jacques Hiblot's avatar Jean-Jacques Hiblot Committed by Marek Vasut

dm: usb: gadget: Fix boot breakage on sunxi platforms

Fixes commit 01311624 ("dm: usb: create a new UCLASS ID for USB gadget

The UCLASS_DRIVER for id UCLASS_USB_GADGET_GENERIC needs to be declared
even for platforms that do not enable DM_USB_GADGET. Otherwise the driver
for their usb peripheral controller fails to bind.
Reported-by: default avatarPriit Laes <>
Reported-by: Jagan Teki's avatarJagan Teki <>
Signed-off-by: default avatarJean-Jacques Hiblot <>
Tested-by: default avatarPriit Laes <>
Acked-by: default avatarJagan Teki <>
parent db17a92d
......@@ -6,4 +6,5 @@ ifndef CONFIG_$(SPL_)DM_USB_GADGET
obj-$(CONFIG_USB_DWC3_GADGET) += udc-core.o
obj-$(CONFIG_$(SPL_)DM_USB_GADGET) += udc-uclass.o udc-core.o
obj-$(CONFIG_$(SPL_)DM_USB_GADGET) += udc-core.o
obj-$(CONFIG_$(SPL_)DM) += udc-uclass.o
......@@ -9,6 +9,7 @@
#include <dm/device-internal.h>
#include <linux/usb/gadget.h>
static struct udevice *dev_array[MAX_UDC_DEVICES];
int usb_gadget_initialize(int index)
......@@ -51,6 +52,7 @@ int usb_gadget_handle_interrupts(int index)
return -EINVAL;
return dm_usb_gadget_handle_interrupts(dev_array[index]);
UCLASS_DRIVER(usb_gadget_generic) = {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment