[PATCH] Rockchip board with DWC3 controller may lead to usb init function declared twice

Janpieter Sollie janpieter.sollie at edpnet.be
Sat Mar 20 06:19:00 CET 2021


diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
index c386b529..11866e6e 100644
--- a/arch/arm/mach-rockchip/board.c
+++ b/arch/arm/mach-rockchip/board.c
@@ -67,7 +67,7 @@ static struct dwc2_plat_otg_data otg_data = {
        .tx_fifo_sz     = 128,
 };

-int board_usb_init(int index, enum usb_init_type init)
+static int __board_usb_init(int index, enum usb_init_type init)
 {
        ofnode node;
        const char *mode;
@@ -151,6 +151,13 @@ int board_usb_init(int index, enum usb_init_type init)
 }
 #endif /* CONFIG_USB_DWC3_GADGET */

+#else
+int board_usb_init(int index, enum usb_init_type init)
+{
+       return __board_usb_init(&dwc3_device_data);
+}
+
+
 #endif /* CONFIG_USB_GADGET */

 #if CONFIG_IS_ENABLED(FASTBOOT)


More information about the U-Boot mailing list