diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2010-10-19 22:06:20 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2010-10-19 22:06:20 +0000 |
commit | 9867ea24e8b6672e94d9cc2283e1c2a0fe7a4ea1 (patch) | |
tree | ac178e88227887c2bff187608c7308d1f4748621 /flash.h | |
parent | b87ea1977b2033717198cadcd238dbc858d8e1dd (diff) | |
download | flashrom-9867ea24e8b6672e94d9cc2283e1c2a0fe7a4ea1.zip flashrom-9867ea24e8b6672e94d9cc2283e1c2a0fe7a4ea1.tar.gz |
Always read the flash chip before writing
This will allow flashrom to skip erase of already-erased blocks and to skip
write of blocks which already have the wanted contents. Avoid emergency
messages by checking if the chip contents after a failed write operation
(erase/write) are unchanged. Keep the emergency messages after a failed
pure erase. That part is debatable because if someone wants erase, he pretty
sure doesn't care about the flash contents anymore. Please note that this
introduces additional overhead of a full chip read before write. This is
frowned upon by people with slow programmers. A followup patch will make
this configurable.
Corresponding to flashrom svn r1215.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coreboot.org>
Diffstat (limited to 'flash.h')
-rw-r--r-- | flash.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -239,7 +239,7 @@ int cli_classic(int argc, char *argv[]); /* layout.c */ int read_romlayout(char *name); int find_romentry(char *name); -int handle_romentries(uint8_t *buffer, struct flashchip *flash); +int handle_romentries(struct flashchip *flash, uint8_t *oldcontents, uint8_t *newcontents); /* spi.c */ struct spi_command { |