]> Git Repo - J-u-boot.git/commitdiff
ARM: Mediatek: Add board_late_init to init usb gadget driver
authormingming lee <[email protected]>
Thu, 16 Jan 2020 08:11:38 +0000 (16:11 +0800)
committerTom Rini <[email protected]>
Sat, 25 Jan 2020 17:04:36 +0000 (12:04 -0500)
Add board_late_init function to init usb gadget driver for mt8518

Signed-off-by: mingming lee <[email protected]>
board/mediatek/mt8518/mt8518_ap1.c

index 9710907fe29db54dc12ce4444164e81382343028..2ac7c6cd18dbbe004147b48858f834f5f6521732 100644 (file)
@@ -16,3 +16,21 @@ int board_init(void)
        debug("gd->fdt_blob is %p\n", gd->fdt_blob);
        return 0;
 }
+
+int board_late_init(void)
+{
+#ifdef CONFIG_USB_GADGET
+       struct udevice *dev;
+       int ret;
+#endif
+
+#ifdef CONFIG_USB_GADGET
+       ret = uclass_get_device(UCLASS_USB_GADGET_GENERIC, 0, &dev);
+       if (ret) {
+               pr_err("%s: Cannot find USB device\n", __func__);
+               return ret;
+       }
+#endif
+
+       return 0;
+}
This page took 0.032994 seconds and 4 git commands to generate.