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

Wolfgang Denk wd at denx.de
Thu Dec 20 00:10:40 CET 2012


Dear Simon Glass,

In message <1348878482-1730-1-git-send-email-sjg at chromium.org> you 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

I dislike making commands more verbose then needed, or helpful.  Of
course the latter may be considered a matter of taste, but first of
all you also add code size here for questionable benefit.

I object against this patch:

1) I cannot see what is so special in the "sf" command that it needs
   such handling, while commands accessing NOR or NAND flash or
   SDCard or any other storage devices don't.

   If there is an agreement that this feature should be added, then it
   should be done in a general way that can be used everywhere.

   [Note that I doubt that "if".]

2) The code size hurts (at least in some cases). Such code should be
   optional. Please make it configurable.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A witty saying proves nothing, but saying  something  pointless  gets
people's attention.


More information about the U-Boot mailing list