Commit e65016150e2b66dfee0521cb3b2d477694b341ef
Committed by
Tom Rini
1 parent
7d017d607e
Exists in
smarc_8mq_lf_v2020.04
and in
10 other branches
ARM: Mediatek: Add board_late_init to init usb gadget driver
Add board_late_init function to init usb gadget driver for mt8518 Signed-off-by: mingming lee <mingming.lee@mediatek.com>
Showing 1 changed file with 18 additions and 0 deletions Side-by-side Diff
board/mediatek/mt8518/mt8518_ap1.c
... | ... | @@ -16,4 +16,22 @@ |
16 | 16 | debug("gd->fdt_blob is %p\n", gd->fdt_blob); |
17 | 17 | return 0; |
18 | 18 | } |
19 | + | |
20 | +int board_late_init(void) | |
21 | +{ | |
22 | +#ifdef CONFIG_USB_GADGET | |
23 | + struct udevice *dev; | |
24 | + int ret; | |
25 | +#endif | |
26 | + | |
27 | +#ifdef CONFIG_USB_GADGET | |
28 | + ret = uclass_get_device(UCLASS_USB_GADGET_GENERIC, 0, &dev); | |
29 | + if (ret) { | |
30 | + pr_err("%s: Cannot find USB device\n", __func__); | |
31 | + return ret; | |
32 | + } | |
33 | +#endif | |
34 | + | |
35 | + return 0; | |
36 | +} |