public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] fastboot: Add USB cable detect check
Date: Tue, 24 Feb 2015 11:07:22 +0100	[thread overview]
Message-ID: <20150224110722.61541199@amdc2363> (raw)
In-Reply-To: <CAL_JsqLHKL0r32OmQ81DysswLLZCCHZ+3dq50qoo39oEjg1-uQ@mail.gmail.com>

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

      reply	other threads:[~2015-02-24 10:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150224110722.61541199@amdc2363 \
    --to=l.majewski@samsung.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox