This is especially important for the SST FWH compatible chips with 4K sector
size, where status printing for that small size was omitted up to r1347.

Signed-off-by: Michael Karcher <[email protected]>
---
 82802ab.c       |    3 ++-
 sharplhf00l04.c |    6 ++++--
 sst49lfxxxc.c   |    3 ++-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/82802ab.c b/82802ab.c
index 09b95e6..9c82c35 100644
--- a/82802ab.c
+++ b/82802ab.c
@@ -134,7 +134,8 @@ int erase_block_82802ab(struct flashchip *flash, unsigned 
int page, unsigned int
 
        // now let's see what the register is
        status = wait_82802ab(flash);
-       print_status_82802ab(status);
+       if (status != 0x80)     /* Ready, no error bits */
+               print_status_82802ab(status);
 
        if (check_erased_range(flash, page, pagesize)) {
                msg_cerr("ERASE FAILED!\n");
diff --git a/sharplhf00l04.c b/sharplhf00l04.c
index f21950a..584f0b3 100644
--- a/sharplhf00l04.c
+++ b/sharplhf00l04.c
@@ -35,7 +35,8 @@ int erase_lhf00l04_block(struct flashchip *flash, unsigned 
int blockaddr, unsign
        // clear status register
        chip_writeb(0x50, bios);
        status = wait_82802ab(flash);
-       print_status_82802ab(status);
+       if (status != 0x80)     /* Ready, no error bits */
+               print_status_82802ab(status);
        // clear write protect
        msg_cspew("write protect is at 0x%lx\n", (wrprotect));
        msg_cspew("write protect is 0x%x\n", chip_readb(wrprotect));
@@ -48,7 +49,8 @@ int erase_lhf00l04_block(struct flashchip *flash, unsigned 
int blockaddr, unsign
        programmer_delay(10);
        // now let's see what the register is
        status = wait_82802ab(flash);
-       print_status_82802ab(status);
+       if (status != 0x80)     /* Ready, no error bits */
+               print_status_82802ab(status);
 
        if (check_erased_range(flash, blockaddr, blocklen)) {
                msg_cerr("ERASE FAILED!\n");
diff --git a/sst49lfxxxc.c b/sst49lfxxxc.c
index 392d7a8..bca49cd 100644
--- a/sst49lfxxxc.c
+++ b/sst49lfxxxc.c
@@ -68,7 +68,8 @@ int erase_sector_49lfxxxc(struct flashchip *flash, unsigned 
int address, unsigne
        chip_writeb(0xD0, bios + address);
 
        status = wait_82802ab(flash);
-       print_status_82802ab(status);
+       if (status != 0x80)     /* Ready, no error bits */
+               print_status_82802ab(status);
 
        if (check_erased_range(flash, address, sector_size)) {
                msg_cerr("ERASE FAILED!\n");
-- 
1.7.5.3


_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to