From 7d7957712f9d956a40bf44aa4d2c1c9f4aeff476 Mon Sep 17 00:00:00 2001 From: hailfinger Date: Sun, 26 Jun 2011 17:04:16 +0000 Subject: 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 Acked-by: Stefan Tauner git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1353 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- jedec.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'jedec.c') diff --git a/jedec.c b/jedec.c index f23cf53..b96f5fd 100644 --- a/jedec.c +++ b/jedec.c @@ -264,10 +264,7 @@ static int erase_sector_jedec_common(struct flashchip *flash, unsigned int page, /* wait for Toggle bit ready */ toggle_ready_jedec_slow(bios); - if (check_erased_range(flash, page, pagesize)) { - msg_cerr("ERASE FAILED!\n"); - return -1; - } + /* FIXME: Check the status register for errors. */ return 0; } @@ -297,16 +294,12 @@ static int erase_block_jedec_common(struct flashchip *flash, unsigned int block, /* wait for Toggle bit ready */ toggle_ready_jedec_slow(bios); - if (check_erased_range(flash, block, blocksize)) { - msg_cerr("ERASE FAILED!\n"); - return -1; - } + /* FIXME: Check the status register for errors. */ return 0; } static int erase_chip_jedec_common(struct flashchip *flash, unsigned int mask) { - int total_size = flash->total_size * 1024; chipaddr bios = flash->virtual_memory; int delay_us = 0; if(flash->probe_timing != TIMING_ZERO) @@ -329,10 +322,7 @@ static int erase_chip_jedec_common(struct flashchip *flash, unsigned int mask) toggle_ready_jedec_slow(bios); - if (check_erased_range(flash, 0, total_size)) { - msg_cerr("ERASE FAILED!\n"); - return -1; - } + /* FIXME: Check the status register for errors. */ return 0; } -- cgit v1.2.1