mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-07-03 04:42:40 +00:00
board: mediatek: pumpkin: initialize usb device
Initialize USB device on pumpkin if it is enabled in the config. Signed-off-by: Fabien Parent <fparent@baylibre.com>
This commit is contained in:
parent
3dbff96256
commit
c2984eb38e
1 changed files with 17 additions and 0 deletions
|
@ -4,8 +4,25 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <dm.h>
|
||||||
|
|
||||||
int board_init(void)
|
int board_init(void)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int board_late_init(void)
|
||||||
|
{
|
||||||
|
struct udevice *dev;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
if (CONFIG_IS_ENABLED(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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue