All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] fastboot: Add USB cable detect check
@ 2015-01-26 21:14 Rob Herring
  2015-01-29  8:28 ` Lukasz Majewski
  2015-01-29 22:49 ` Steve Rae
  0 siblings, 2 replies; 5+ messages in thread
From: Rob Herring @ 2015-01-26 21:14 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Rob Herring <robh@kernel.org>
---
 common/cmd_fastboot.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
index b72f4f3..346ab80 100644
--- 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;
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] fastboot: Add USB cable detect check
  2015-01-26 21:14 [U-Boot] [PATCH] fastboot: Add USB cable detect check Rob Herring
@ 2015-01-29  8:28 ` Lukasz Majewski
  2015-01-29 22:49 ` Steve Rae
  1 sibling, 0 replies; 5+ messages in thread
From: Lukasz Majewski @ 2015-01-29  8:28 UTC (permalink / raw)
  To: u-boot

Hi Rob,

> Add a check for USB cable attached and only enter fastboot when a
> cable is attached.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  common/cmd_fastboot.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
> index b72f4f3..346ab80 100644
> --- 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;

Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>

-- 
Best regards,

Lukasz Majewski

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] fastboot: Add USB cable detect check
  2015-01-26 21:14 [U-Boot] [PATCH] fastboot: Add USB cable detect check Rob Herring
  2015-01-29  8:28 ` Lukasz Majewski
@ 2015-01-29 22:49 ` Steve Rae
  2015-01-30 14:00   ` Rob Herring
  1 sibling, 1 reply; 5+ messages in thread
From: Steve Rae @ 2015-01-29 22:49 UTC (permalink / raw)
  To: u-boot



On 15-01-26 01:14 PM, Rob Herring wrote:
> Add a check for USB cable attached and only enter fastboot when a cable
> is attached.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>   common/cmd_fastboot.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
> index b72f4f3..346ab80 100644
> --- 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;
>

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

Reviewed-by: Steve Rae <srae@broadcom.com>

Thanks, Steve

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] fastboot: Add USB cable detect check
  2015-01-29 22:49 ` Steve Rae
@ 2015-01-30 14:00   ` Rob Herring
  2015-02-24 10:07     ` Lukasz Majewski
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2015-01-30 14:00 UTC (permalink / raw)
  To: u-boot

On Thu, Jan 29, 2015 at 4:49 PM, Steve Rae <srae@broadcom.com> wrote:
>
>
> On 15-01-26 01:14 PM, Rob Herring wrote:
>>
>> Add a check for USB cable attached and only enter fastboot when a cable
>> is attached.
>>
>> Signed-off-by: Rob Herring <robh@kernel.org>
>> ---
>>   common/cmd_fastboot.c | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
>> index b72f4f3..346ab80 100644
>> --- 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;
>>
>
> (question: the leading "\r" ?!?!)

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

Rob

> Reviewed-by: Steve Rae <srae@broadcom.com>
>
> Thanks, Steve

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] fastboot: Add USB cable detect check
  2015-01-30 14:00   ` Rob Herring
@ 2015-02-24 10:07     ` Lukasz Majewski
  0 siblings, 0 replies; 5+ messages in thread
From: Lukasz Majewski @ 2015-02-24 10:07 UTC (permalink / raw)
  To: u-boot

Hi Rob,

> On Thu, Jan 29, 2015 at 4:49 PM, Steve Rae <srae@broadcom.com> wrote:
> >
> >
> > On 15-01-26 01:14 PM, Rob Herring wrote:
> >>
> >> Add a check for USB cable attached and only enter fastboot when a
> >> cable is attached.
> >>
> >> Signed-off-by: Rob Herring <robh@kernel.org>
> >> ---
> >>   common/cmd_fastboot.c | 6 ++++++
> >>   1 file changed, 6 insertions(+)
> >>
> >> diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
> >> index b72f4f3..346ab80 100644
> >> --- 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;
> >>
> >
> > (question: the leading "\r" ?!?!)
> 
> Humm, good question. It's copy and paste from USB MS implementation.
> 
> Rob
> 
> > Reviewed-by: Steve Rae <srae@broadcom.com>
> >
> > Thanks, Steve

Queued for u-boot-dfu branch.

Thanks for development and sorry for delay.

-- 
Best regards,

Lukasz Majewski

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-24 10:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-26 21:14 [U-Boot] [PATCH] fastboot: Add USB cable detect check Rob Herring
2015-01-29  8:28 ` Lukasz Majewski
2015-01-29 22:49 ` Steve Rae
2015-01-30 14:00   ` Rob Herring
2015-02-24 10:07     ` Lukasz Majewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.