From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] fastboot: add "fastboot oem" command support
Date: Fri, 30 Jan 2015 15:29:22 +0100 [thread overview]
Message-ID: <20150130152922.25ced835@amdc2363> (raw)
In-Reply-To: <CAL_JsqKfebG=KYKBmRy6ags-OVvt52bdf+3yN0yAzStDQ+u93A@mail.gmail.com>
Hi Rob,
> On Thu, Jan 29, 2015 at 2:30 AM, Lukasz Majewski
> <l.majewski@samsung.com> wrote:
> > Hi Rob,
> >
> >> From: Michael Scott <michael.scott@linaro.org>
> >>
> >> Add code stub to handle "fastboot oem __" command. As unlock is a
> >> common fastboot command, distinguish that it is not implemented.
> >>
> >> Signed-off-by: Michael Scott <michael.scott@linaro.org>
> >> Signed-off-by: Rob Herring <robh@kernel.org>
> >> ---
> >> drivers/usb/gadget/f_fastboot.c | 15 +++++++++++++++
> >> 1 file changed, 15 insertions(+)
> >>
> >> diff --git a/drivers/usb/gadget/f_fastboot.c
> >> b/drivers/usb/gadget/f_fastboot.c index 310175a..e2fda86 100644
> >> --- a/drivers/usb/gadget/f_fastboot.c
> >> +++ b/drivers/usb/gadget/f_fastboot.c
> >> @@ -513,6 +513,17 @@ static void cb_flash(struct usb_ep *ep, struct
> >> usb_request *req) }
> >> #endif
> >>
> >> +static void cb_oem(struct usb_ep *ep, struct usb_request *req)
> >> +{
> >> + char *cmd = req->buf;
> >> + if (strncmp("unlock", cmd + 4, 8) == 0) {
> >> + fastboot_tx_write_str("FAILnot implemented");
> >> + }
> >> + else {
> >> + fastboot_tx_write_str("FAILunknown oem command");
> >> + }
> >
> > Just a minor comment - those braces could be removed.
>
> When the format command is added in the next patch, then they need to
> be added back if you want all clauses to be the same (braces or not).
Then the patch can stay as it is. Thanks for explanation :-)
>
> Rob
>
> > BTW: Marek shall I take those patches to dfu tree or would you take
> > them to -usb tree ?
> >
> >> +}
> >> +
> >> struct cmd_dispatch_info {
> >> char *cmd;
> >> void (*cb)(struct usb_ep *ep, struct usb_request *req);
> >> @@ -541,6 +552,10 @@ static const struct cmd_dispatch_info
> >> cmd_dispatch_info[] = { .cb = cb_flash,
> >> },
> >> #endif
> >> + {
> >> + .cmd = "oem",
> >> + .cb = cb_oem,
> >> + },
> >> };
> >>
> >> static void rx_handler_command(struct usb_ep *ep, struct
> >> usb_request *req)
> >
> >
> >
> > --
> > Best regards,
> >
> > Lukasz Majewski
> >
> > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
next prev parent reply other threads:[~2015-01-30 14:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-26 21:48 [U-Boot] [PATCH 0/2] Fastboot OEM commands Rob Herring
2015-01-26 21:49 ` [U-Boot] [PATCH 1/2] fastboot: add "fastboot oem" command support Rob Herring
2015-01-29 8:30 ` Lukasz Majewski
2015-01-29 16:49 ` Marek Vasut
2015-01-30 14:20 ` Rob Herring
2015-01-30 14:29 ` Lukasz Majewski [this message]
2015-01-29 23:27 ` Steve Rae
2015-01-30 15:02 ` Lukasz Majewski
2015-01-26 21:49 ` [U-Boot] [PATCH 2/2] fastboot: add support for "oem format" command Rob Herring
2015-01-29 8:31 ` Lukasz Majewski
2015-01-29 23:27 ` Steve Rae
2015-01-30 15:03 ` Lukasz Majewski
2015-02-11 19:44 ` Steve Rae
2015-02-12 1:46 ` Rob Herring
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=20150130152922.25ced835@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