summaryrefslogtreecommitdiff
path: root/util/ec_flash.h
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2019-05-30 16:59:25 -0700
committerCommit Bot <commit-bot@chromium.org>2019-06-06 00:32:29 +0000
commit9a5e19845eb76e0b10311b4829ab39ba73835fa3 (patch)
tree02c7c67dd19b8b06df17ea48484e92def3521dbe /util/ec_flash.h
parentdc5bb3536677fb332c4a3f71d31b57647ff9a7a8 (diff)
downloadchrome-ec-9a5e19845eb76e0b10311b4829ab39ba73835fa3.tar.gz
ectool: add async flash erase
BRANCH=none TEST=ectool --name=cros_fp reboot_ec; sleep 0.5 && \ ectool --name=cros_fp rwsigaction abort; \ ectool --name=cros_fp flasheraseasync 393216 131072 (using hatch EVT fingerprint board: STM32F412) TEST=make buildall -j BUG=b:132444384 Change-Id: I4a78c5bf7ef323a14083cc9d5fa3ec2c5218245d Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1637496 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'util/ec_flash.h')
-rw-r--r--util/ec_flash.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/util/ec_flash.h b/util/ec_flash.h
index e5b7baef79..45bfeb5f5d 100644
--- a/util/ec_flash.h
+++ b/util/ec_flash.h
@@ -49,4 +49,14 @@ int ec_flash_write(const uint8_t *buf, int offset, int size);
*/
int ec_flash_erase(int offset, int size);
+/**
+ * Erase EC flash memory asynchronously
+ *
+ * @param offset Offset in EC flash to erase
+ * @param size Number of bytes to erase
+ *
+ * @return 0 if success, negative if error.
+ */
+int ec_flash_erase_async(int offset, int size);
+
#endif