path: root/sst49lfxxxc.c
diff options
authorCarl-Daniel Hailfinger <>2010-10-08 18:52:29 +0000
committerCarl-Daniel Hailfinger <>2010-10-08 18:52:29 +0000
commitf52f784bb300ec0acbd6c6bd9e6c3e5b435c4a90 (patch)
tree957964a468245432abbd23cd06839898b64105ce /sst49lfxxxc.c
parent92c8b0cec2ed06db9c24c4d93cf38a596edf23ab (diff)
Move implicit erase out of chip drivers
Flashrom had an implicit erase-on-write for most flash chip and programmer drivers, but it was not entirely consistent. Some drivers had their own hand-rolled partial update functionality which made handling partial updates from generic code impossible. Move implicit erase out of chip drivers, and kill some dead erase functions at the same time. A full chip erase is now performed in the generic code for all flash chips on write, and after that the whole chip is written. Corresponding to flashrom svn r1206. Signed-off-by: Carl-Daniel Hailfinger <> Acked-by: Uwe Hermann <>
Diffstat (limited to 'sst49lfxxxc.c')
1 files changed, 0 insertions, 5 deletions
diff --git a/sst49lfxxxc.c b/sst49lfxxxc.c
index 2f14b7a..f31e22c 100644
--- a/sst49lfxxxc.c
+++ b/sst49lfxxxc.c
@@ -86,11 +86,6 @@ int write_49lfxxxc(struct flashchip *flash, uint8_t *buf)
write_lockbits_49lfxxxc(flash, 0);
msg_cinfo("Programming page: ");
for (i = 0; i < total_size / page_size; i++) {
- /* erase the page before programming */
- if (erase_sector_49lfxxxc(flash, i * page_size, flash->page_size)) {
- msg_cerr("ERASE FAILED!\n");
- return -1;
- }
/* write to the sector */
msg_cinfo("%04d at address: 0x%08x", i, i * page_size);
OpenPOWER on IntegriCloud