Skip to content
Snippets Groups Projects
Commit 7c23bcb9 authored by Rob Herring's avatar Rob Herring Committed by Marek Vasut
Browse files

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: default avatarRob Herring <robh@kernel.org>
Reviewed-by: default avatarSteve Rae <srae@broadcom.com>
Reviewed-by: default avatarLukasz Majewski <l.majewski@samsung.com>
parent 89792381
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment