summaryrefslogtreecommitdiffstats
path: root/flash.h
diff options
context:
space:
mode:
authorBoris Baykov <dev@borisbaykov.com>2016-06-08 12:23:55 +0200
committerCédric Le Goater <clg@kaod.org>2016-06-08 12:23:55 +0200
commitde6a59ef0a1122b805de3cd7ffb3e06ae07b9e38 (patch)
tree5fe3a803d9a91e27e213904737b9b0cd64eacec8 /flash.h
parent146062255451c196701c8a36e4196023a7be36be (diff)
downloadflashrom-de6a59ef0a1122b805de3cd7ffb3e06ae07b9e38.zip
flashrom-de6a59ef0a1122b805de3cd7ffb3e06ae07b9e38.tar.gz
4BA: Progress visualization for long read, writes and erases
I've added progress visualization for read, erase and write operations. It's turned out that seeing progress is essential for reading and especially writing 32 MB of data via SPI. The operation can take more then 10 minutes on 15 MHz frequency of SPI. So, it's good to see its progress. I've added percents and slightly modified cli_output.c to send percents to screen only but not to logfile. Patched files ------------- cli_output.c + print() patched to skip strings which are starting from '\b' to prevent writing progress percents to logfile flash.h + added some definitions for progress visialization flashrom.c + added progress visualization for erase/write (essensial for 32MB+ chips) spi25.c + added progress visualization for read operation (essensial for 32MB+ chips) Signed-off-by: Boris Baykov <dev@borisbaykov.com>, Russia, Jan 2014 [clg: ported from https://www.flashrom.org/pipermail/flashrom/2015-January/013203.html ] Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'flash.h')
-rw-r--r--flash.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/flash.h b/flash.h
index 7f79387..0b72439 100644
--- a/flash.h
+++ b/flash.h
@@ -360,6 +360,11 @@ __attribute__((format(printf, 2, 3)));
#define msg_pspew(...) print(MSG_SPEW, __VA_ARGS__) /* programmer debug spew */
#define msg_cspew(...) print(MSG_SPEW, __VA_ARGS__) /* chip debug spew */
+/* Read progress will be shown for reads more than 256KB */
+#define MIN_LENGTH_TO_SHOW_READ_PROGRESS 256 * 1024
+/* Read progress will be shown for erases and writes more than 64KB */
+#define MIN_LENGTH_TO_SHOW_ERASE_AND_WRITE_PROGRESS 64 * 1024
+
/* layout.c */
int register_include_arg(char *name);
int process_include_args(void);
OpenPOWER on IntegriCloud