public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 1/2] fastboot: Add support to flash u-boot and MLO to QSPI
Date: Sat, 21 Feb 2015 21:59:43 -0500	[thread overview]
Message-ID: <20150222025943.GL25879@bill-the-cat> (raw)
In-Reply-To: <CAL_JsqJAaTKS8-NQqJW7Xz5k0xpRyzv9z+gxtrpEG=HT2e8TUQ@mail.gmail.com>

On Thu, Feb 19, 2015 at 02:04:01PM -0600, Rob Herring wrote:
> On Wed, Feb 18, 2015 at 4:53 PM, Dileep Katta <dileep.katta@linaro.org> wrote:
> > This adds the functionality to flash u-boot and MLO images to QSPI using fastboot
> >
> > Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> > ---
> > Note: This is on top of Rob Herring patches submitted to support oem format command
> >  drivers/usb/gadget/f_fastboot.c | 75 +++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 75 insertions(+)
> >
> > diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
> > index f7d84bf..a170eea 100644
> > --- a/drivers/usb/gadget/f_fastboot.c
> > +++ b/drivers/usb/gadget/f_fastboot.c
> > @@ -492,10 +492,23 @@ static void cb_continue(struct usb_ep *ep, struct usb_request *req)
> >  }
> >
> >  #ifdef CONFIG_FASTBOOT_FLASH
> > +#ifdef CONFIG_SPL_SPI_SUPPORT
> > +int boot_from_spi = 0;
> > +#endif
> > +
> >  static void cb_flash(struct usb_ep *ep, struct usb_request *req)
> >  {
> >         char *cmd = req->buf;
> >         char response[RESPONSE_LEN];
> > +#ifdef CONFIG_SPL_SPI_SUPPORT
> > +       char source[32];
> > +       int status = 0;
> > +       char *sf_probe[3] = {"sf", "probe", "0"};
> > +       char *sf_write_xloader[5] = {"sf", "write", NULL, "0", "20000"};
> > +       char *sf_update_xloader[5] = {"sf", "update", NULL, "0", "20000"};
> > +       char *sf_write_bl[5] = {"sf", "write", NULL, "80000", "80000"};
> > +       char *sf_update_bl[5] = {"sf", "update", NULL, "80000", "80000"};
> > +#endif
> >
> >         strsep(&cmd, ":");
> >         if (!cmd) {
> > @@ -505,6 +518,68 @@ static void cb_flash(struct usb_ep *ep, struct usb_request *req)
> >         }
> >
> >         strcpy(response, "FAILno flash device defined");
> > +#ifdef CONFIG_SPL_SPI_SUPPORT
> > +       /*
> > +        * Check if this is for xloader or bootloader.
> > +        * Also, check if we have to flash to SPI
> > +        */
> > +       if (strcmp(cmd, "xloader") == 0 && boot_from_spi) {
> 
> xloader is pretty specific to TI, so it belongs in TI specific code.

And it's not even "xloader", it's SPL.  So are there external tools
relying on this that can't be updated?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150221/b27dece1/attachment.sig>

  reply	other threads:[~2015-02-22  2:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18 22:53 [U-Boot] [PATCH v1 1/2] fastboot: Add support to flash u-boot and MLO to QSPI Dileep Katta
2015-02-18 22:53 ` [U-Boot] [PATCH v1 2/2] fastboot: Add support in fastboot oem command to set QSPI as boot device Dileep Katta
2015-02-20 15:06   ` Rob Herring
2015-02-19 14:27 ` [U-Boot] [PATCH v1 1/2] fastboot: Add support to flash u-boot and MLO to QSPI Tom Rini
2015-02-19 20:04 ` Rob Herring
2015-02-22  2:59   ` Tom Rini [this message]
2015-02-27 13:04     ` Dileep Katta
2015-02-24 11:39   ` Lukasz Majewski

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=20150222025943.GL25879@bill-the-cat \
    --to=trini@ti.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