diff options
author | hailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2011-06-26 17:04:16 +0000 |
---|---|---|
committer | hailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2011-06-26 17:04:16 +0000 |
commit | 7d7957712f9d956a40bf44aa4d2c1c9f4aeff476 (patch) | |
tree | 99b4aec1edbe35372a0fe653b5448f52c0fe98c8 /flashrom.c | |
parent | 22a758394c4ab12c43497c1a0a27b0b75c09b00b (diff) | |
download | flashrom-7d7957712f9d956a40bf44aa4d2c1c9f4aeff476.tar.gz |
Erase functions are no longer called from chip drivers and thus their
internal erase verification can be moved to generic code.
This also makes it easier to skip the verify step if desired and to
differentiate between failed command submission and failed erase
verification.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1353 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'flashrom.c')
-rw-r--r-- | flashrom.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1400,6 +1400,10 @@ static int erase_and_write_block_helper(struct flashchip *flash, ret = erasefn(flash, start, len); if (ret) return ret; + if (check_erased_range(flash, start, len)) { + msg_cerr("ERASE FAILED!\n"); + return -1; + } /* Erase was successful. Adjust curcontents. */ memset(curcontents, 0xff, len); skip = 0; |