From 0eb4e5ed213a64025c22dcb0536e78a22c878a23 Mon Sep 17 00:00:00 2001 From: hailfinger Date: Fri, 8 Oct 2010 18:52:29 +0000 Subject: 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. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Uwe Hermann git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1206 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- jedec.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'jedec.c') diff --git a/jedec.c b/jedec.c index 05cba79..b4bd3f1 100644 --- a/jedec.c +++ b/jedec.c @@ -402,11 +402,6 @@ int write_jedec(struct flashchip *flash, uint8_t *buf) mask = getaddrmask(flash); - if (erase_chip_jedec(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); @@ -429,12 +424,6 @@ int write_jedec_1(struct flashchip *flash, uint8_t * buf) mask = getaddrmask(flash); - programmer_delay(10); - if (erase_flash(flash)) { - msg_cerr("ERASE FAILED!\n"); - return -1; - } - msg_cinfo("Programming page: "); for (i = 0; i < flash->total_size; i++) { if ((i & 0x3) == 0) -- cgit v1.2.1