From f52f784bb300ec0acbd6c6bd9e6c3e5b435c4a90 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Fri, 8 Oct 2010 18:52:29 +0000 Subject: 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 --- sharplhf00l04.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'sharplhf00l04.c') diff --git a/sharplhf00l04.c b/sharplhf00l04.c index a891e2c8..ab1652db 100644 --- a/sharplhf00l04.c +++ b/sharplhf00l04.c @@ -65,10 +65,6 @@ int write_lhf00l04(struct flashchip *flash, uint8_t *buf) int page_size = flash->page_size; chipaddr bios = flash->virtual_memory; - if (erase_flash(flash)) { - msg_cerr("ERASE FAILED!\n"); - return -1; - } msg_cinfo("Programming page: "); for (i = 0; i < total_size / page_size; i++) { msg_cinfo("%04d at address: 0x%08x", i, i * page_size); -- cgit v1.2.3