bootstd: usb: Avoid initing USB twice
This causes crashes on some boards, e.g. rockpro64. In any case, we should not do it. Check the usb_started flag to avoid this. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Jonas Karlman <jonas@kwiboo.se> Tested-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
@@ -22,6 +22,9 @@ static int usb_bootdev_bind(struct udevice *dev)
|
||||
|
||||
static int usb_bootdev_hunt(struct bootdev_hunter *info, bool show)
|
||||
{
|
||||
if (usb_started)
|
||||
return 0;
|
||||
|
||||
return usb_init();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user