summaryrefslogtreecommitdiffstats
path: root/sst28sf040.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2021-01-15 09:48:12 +0000
committerEdward O'Callaghan <quasisec@chromium.org>2022-05-25 08:08:13 +0000
commit40892b0c08fbc8029921e91511dd3f91fc956f90 (patch)
tree56b6fccd5c99c00649369fcf097c4555313b753c /sst28sf040.c
parentb86ae179adfb4acb4190ef2abe2ee8905c44f26a (diff)
downloadflashrom-40892b0c08fbc8029921e91511dd3f91fc956f90.tar.gz
flashrom-40892b0c08fbc8029921e91511dd3f91fc956f90.tar.bz2
flashrom-40892b0c08fbc8029921e91511dd3f91fc956f90.zip
libflashrom: Return progress state to the library user
Projects using libflashrom like fwupd expect the user to wait for the operation to complete. To avoid the user thinking the process has "hung" or "got stuck" report back the progress complete of the erase, write and read operations. Add a new --progress flag to the CLI to report progress of operations. Include a test for the dummy spi25 device. TEST=./test_build.sh; ./flashrom -p lspcon_i2c_spi:bus=7 -r /dev/null --progress Change-Id: I7197572bb7f19e3bdb2bde855d70a0f50fd3854c Signed-off-by: Richard Hughes <richard@hughsie.com> Signed-off-by: Daniel Campello <campello@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/49643 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Thomas Heijligen <src@posteo.de>
Diffstat (limited to 'sst28sf040.c')
-rw-r--r--sst28sf040.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sst28sf040.c b/sst28sf040.c
index 3da25f127..9a08d6b61 100644
--- a/sst28sf040.c
+++ b/sst28sf040.c
@@ -92,6 +92,7 @@ int write_28sf040(struct flashctx *flash, const uint8_t *src, unsigned int start
/* wait for Toggle bit ready */
toggle_ready_jedec(flash, bios);
+ update_progress(flash, FLASHROM_PROGRESS_WRITE, i + 1, len);
}
return 0;