Skip to content
Snippets Groups Projects
Commit a683c288 authored by James Miller's avatar James Miller Committed by Tom Rini
Browse files

spi: Add progress percentage and write speed to `sf update`


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: default avatarSimon Glass <sjg@chromium.org>
Signed-off-by: default avatarJames Miller <jamesmiller@chromium.org>
Signed-off-by: default avatarTaylor Hutt <thutt@chromium.org>
[trini: Drop 'const' from bytes_per_second()]
Signed-off-by: default avatarTom Rini <trini@ti.com>
parent 09572880
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment