summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaoran.Wang <elven.wang@nxp.com>2018-08-06 19:23:20 +0800
committerfaqiang.zhu <faqiang.zhu@nxp.com>2018-08-15 11:04:11 +0800
commit8c3012ac13dd11bc492d9d78e0b51b5f754f8565 (patch)
tree61ef0cbc0c5b4c2c31a2c219b6031671b9de3330
parent4d436d59150c630de42845987ba7c7371aef1cd4 (diff)
MA-12283 Enter fastboot mode directly if usb boot
Change bootcmd to "fastboot 0" directly when detect booted from USB. By this the u-boot which booted by uuu will enter fastboot mode and ready for the remain commands. Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
-rw-r--r--drivers/usb/gadget/f_fastboot.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 9f4c11b34e..b7ceff6699 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -1548,6 +1548,10 @@ void board_fastboot_setup(void)
if (!getenv("bootcmd"))
setenv("bootcmd", boot_dev_part);
break;
+ case USB_BOOT:
+ printf("Detect USB boot. Will enter fastboot mode!\n");
+ if (!getenv("bootcmd"))
+ setenv("bootcmd", "fastboot 0");
#endif /*CONFIG_FASTBOOT_STORAGE_MMC*/
default:
printf("unsupported boot devices\n");