projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8979238
)
fastboot: Add USB cable detect check
author
Rob Herring
<robh@kernel.org>
Mon, 26 Jan 2015 21:14:41 +0000
(15:14 -0600)
committer
Marek Vasut
<marex@denx.de>
Wed, 25 Feb 2015 16:47:02 +0000
(17:47 +0100)
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>
common/cmd_fastboot.c
patch
|
blob
|
history
diff --git
a/common/cmd_fastboot.c
b/common/cmd_fastboot.c
index
b72f4f3
..
346ab80
100644
(file)
--- a/
common/cmd_fastboot.c
+++ b/
common/cmd_fastboot.c
@@
-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;