Skip to contentSkip to conversation

fastboot: Add USB cable detect check

PATCH New Rob Herring 3 participants 5 messages Jan 26, 2015 – Feb 24, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fastboot: Add USB cable detect check

Add a check for USB cable attached and only enter fastboot when a cable is attached.

---
 common/cmd_fastboot.c | 6 ++++++
 1 file changed, 6 insertions(+)
common/cmd_fastboot.c +6 -0
index b72f4f3..346ab80 100644
@@ -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;
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/1 fastboot: Add USB cable detect check

Hi Rob,

Quoted 15 lines

Add a check for USB cable attached and only enter fastboot when a cable is attached.

---
 common/cmd_fastboot.c | 6 ++++++
 1 file changed, 6 insertions(+)
common/cmd_fastboot.c +0 -0
index b72f4f3..346ab80 100644
@@ -20,6 +20,12 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag,
 int argc, char *const argv[]) if (ret)
 		return ret;

common/cmd_fastboot.c static int do_fastboot(cmd_tbl_t *cmdtp, int flag, · line 31

Quoted 10 lines
common/cmd_fastboot.c +6 -0
 
+	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;
Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
#2 lore raw

PATCH 1/1 fastboot: Add USB cable detect check

In reply to Rob Herring
Quoted 16 lines · Rob Herring

Add a check for USB cable attached and only enter fastboot when a cable is attached.

---
  common/cmd_fastboot.c | 6 ++++++
  1 file changed, 6 insertions(+)
common/cmd_fastboot.c +0 -0
index b72f4f3..346ab80 100644
@@ -20,6 +20,12 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
  	if (ret)
  		return ret;

common/cmd_fastboot.c static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) · line 31

Quoted 10 lines
common/cmd_fastboot.c +6 -0
 
+	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;

(question: the leading "\r" ?!?!)

Thanks, Steve

#3 lore raw

PATCH 1/1 fastboot: Add USB cable detect check

Quoted 21 lines · Steve Rae
Quoted 18 lines · Rob Herring

Add a check for USB cable attached and only enter fastboot when a cable is attached.

---
  common/cmd_fastboot.c | 6 ++++++
  1 file changed, 6 insertions(+)
common/cmd_fastboot.c +0 -0
index b72f4f3..346ab80 100644
@@ -20,6 +20,12 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int
 argc, char *const argv[])
        if (ret)
                return ret;
 
Quoted 12 lines
Quoted 10 lines
common/cmd_fastboot.c +6 -0
+       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;

(question: the leading "\r" ?!?!)

Humm, good question. It's copy and paste from USB MS implementation.

Rob

Quoted 3 lines

Thanks, Steve

#4 lore raw

PATCH 1/1 fastboot: Add USB cable detect check

Hi Rob,

Quoted 35 lines · Steve Rae
Quoted 21 lines · Rob Herring
Quoted 18 lines

Add a check for USB cable attached and only enter fastboot when a cable is attached.

---
  common/cmd_fastboot.c | 6 ++++++
  1 file changed, 6 insertions(+)
common/cmd_fastboot.c +0 -0
index b72f4f3..346ab80 100644
@@ -20,6 +20,12 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int
 flag, int argc, char *const argv[])
        if (ret)
                return ret;
 
Quoted 12 lines
Quoted 10 lines
common/cmd_fastboot.c +6 -0
+       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;

(question: the leading "\r" ?!?!)

Quoted 7 lines

Humm, good question. It's copy and paste from USB MS implementation.

Rob

Quoted 3 lines

Thanks, Steve

Queued for u-boot-dfu branch.

Thanks for development and sorry for delay.

Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group