[U-Boot] [PATCH v4] cmd_sf: add "update" subcommand to do smart SPI flash update

Mike Frysinger vapier at gentoo.org
Sun Aug 21 18:34:18 CEST 2011


On Sunday, August 21, 2011 06:27:16 Simon Glass wrote:
> On Sat, Aug 20, 2011 at 4:35 PM, Mike Frysinger wrote:
> > +static int spi_flash_update(struct spi_flash *flash, u32 offset,
> > +               size_t len, const char *buf)
> > +{
> > +       const char *err_oper = NULL;
> > +       char *cmp_buf;
> > +       const char *end = buf + len;
> > +       size_t todo;            /* number of bytes to do in this pass */
> > +       size_t skipped;         /* statistics */
> > +
> > +       cmp_buf = malloc(flash->sector_size);
> > +       if (cmp_buf) {
> > +               for (skipped = 0; buf < end; buf += todo, offset += todo)
> > {
> 
> Oops I got this wrong:
> 
> for (skipped = 0; buf < end && !err_oper; buf += todo, offset += todo) {
> 
> (or if (err_oper) break in the loop)

you can send a v5 and i'll just replace it in my tree :)

or a diff and i'll just merge it locally ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110821/ebbe2e78/attachment.pgp 


More information about the U-Boot mailing list