From: mingming lee <mingming.lee@mediatek.com>
To: u-boot@lists.denx.de
Subject: [PATCH 2/6] ARM: Mediatek: Add board_late_init to init usb gadget driver
Date: Mon, 6 Jan 2020 14:26:45 +0800 [thread overview]
Message-ID: <20200106062649.6577-3-mingming.lee@mediatek.com> (raw)
In-Reply-To: <20200106062649.6577-1-mingming.lee@mediatek.com>
Add board_late_init function to init usb gadget driver for mt8518
Signed-off-by: mingming lee <mingming.lee@mediatek.com>
---
board/mediatek/mt8518/mt8518_ap1.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/board/mediatek/mt8518/mt8518_ap1.c b/board/mediatek/mt8518/mt8518_ap1.c
index 9710907fe2..2ac7c6cd18 100644
--- a/board/mediatek/mt8518/mt8518_ap1.c
+++ b/board/mediatek/mt8518/mt8518_ap1.c
@@ -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;
+}
--
2.24.1
next prev parent reply other threads:[~2020-01-06 6:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-06 6:26 [PATCH 0/6] Add fastboot support for MediaTek mt8518 mingming lee
2020-01-06 6:26 ` [PATCH 1/6] usb: musb-new: mt85xx: add musb-new gadget driver mingming lee
2020-01-06 6:26 ` mingming lee [this message]
2020-01-06 6:26 ` [PATCH 3/6] configs: mt8518: set global variables for fastboot mingming lee
2020-01-06 6:26 ` [PATCH 4/6] configs: mt8518: enable usb gadget driver mingming lee
2020-01-06 6:26 ` [PATCH 5/6] configs: mt8518: Enable fastboot related configs mingming lee
2020-01-06 6:26 ` [PATCH 6/6] fastboot: mt85xx: add command to flash/erase emmc hwpart mingming lee
2020-01-15 20:48 ` Tom Rini
2020-01-16 1:52 ` Mingming Lee
2020-01-16 12:28 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200106062649.6577-3-mingming.lee@mediatek.com \
--to=mingming.lee@mediatek.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox