fastboot: Add USB cable detect check
Add a check for USB cable attached and only enter fastboot when a cable is attached. Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Steve Rae <srae@broadcom.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
This commit is contained in:
parent
897923819c
commit
7c23bcb93f
@ -20,6 +20,12 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (!g_dnl_board_usb_cable_connected()) {
|
||||
puts("\rUSB cable not detected.\n" \
|
||||
"Command exit.\n");
|
||||
return CMD_RET_FAILURE;
|
||||
}
|
||||
|
||||
while (1) {
|
||||
if (g_dnl_detach())
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user