[U-Boot] [U-Boot, 1/2] spi: Add progress percentage and write speed to `sf update`

Tom Rini trini at ti.com
Wed Dec 19 21:43:28 CET 2012


On Fri, Sep 28, 2012 at 02:28:00PM -0000, Simon Glass wrote:

> From: James Miller <jamesmiller at chromium.org>
> 
> Output a progress update only at most 10 times per second, to avoid
> saturating (and waiting on) the console. Make the summary line
> to fit on a single line. Make sure that cursor sits at the end of
> each update line instead of the beginning.
> 
> Sample output:
> 
> SF: Detected W25Q32 with page size 4 KiB, total 4 MiB
> Update SPI
> 1331200 bytes written, 2863104 bytes skipped in 21.912s, speed 199728 B/s
> 
> time: 21.919 seconds, 21919 ticks
> Skipping verify
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>
> Signed-off-by: James Miller <jamesmiller at chromium.org>
> Signed-off-by: Taylor Hutt <thutt at chromium.org>

With ELDK 4.2:
cmd_sf.c:80: warning: type qualifiers ignored on function return type

Unless I'm missing something, this is the right fix:
-static const ulong bytes_per_second(unsigned int len, ulong start_ms)
+static ulong bytes_per_second(unsigned int len, ulong start_ms)

Because no, we aren't returning a const.  If that sounds right I'll fix
inline and add my Signed-off-by.

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


More information about the U-Boot mailing list