
Hi Wolfgang,
On Wed, Dec 19, 2012 at 3:10 PM, Wolfgang Denk wd@denx.de wrote:
Dear Simon Glass,
In message 1348878482-1730-1-git-send-email-sjg@chromium.org you wrote:
From: James Miller jamesmiller@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:
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".]
Hmmm I suppose that is a good point. The main issue with SPI flash is that it is extremely slow, and writing a few MB can take a minute or so. The 'sf update' command was intended to do a smart update, and the progress is useful for that. Other storage types are not so bad.
Yes it makes sense (if we want this sort of feature) to make it more general feature so that it can be used by all devices. I think it could be done, and then enabled by a CONFIG. We could perhaps make it so that the progress info never appears unless the operation takes at least a few seconds.
- The code size hurts (at least in some cases). Such code should be optional. Please make it configurable.
OK see above. I will take a look.
Regards, Simon
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@denx.de A witty saying proves nothing, but saying something pointless gets people's attention.