[LinuxBIOS] flashrom SST49LF080A patch

Roman Kononov kononov195-lb at yahoo.com
Thu Sep 28 23:32:34 CEST 2006


Hello,

The first patch changes chip erase method from JEDEC Chip Erase to JEDEC Sector Erase for
each sector. See the comment in util/flashrom/sst49lf040.c, line #40. Verified on a real
SST49LF080A chip, for which JEDEC Chip Erase did not work as well.

The second patch makes printf working [as designed].

Roman


Index: util/flashrom/flashchips.c
===================================================================
--- util/flashrom/flashchips.c  (revision 2434)
+++ util/flashrom/flashchips.c  (working copy)
@@ -67,7 +67,7 @@
        {"SST49LF040",  SST_ID,         SST_49LF040,    NULL, 512, 4096,
         probe_jedec,   erase_49lf040, write_49lf040,NULL},
        {"SST49LF080A", SST_ID,         SST_49LF080A,   NULL, 1024, 4096,
-        probe_jedec,   erase_chip_jedec, write_49lf040,NULL},
+        probe_jedec,   erase_49lf040, write_49lf040,NULL},
        {"SST49LF002A/B", SST_ID,       SST_49LF002A,   NULL, 256, 16 * 1024,
         probe_sst_fwhub, erase_sst_fwhub, write_sst_fwhub, NULL},
        {"SST49LF003A/B", SST_ID,       SST_49LF003A,   NULL, 384, 64 * 1024,
Index: util/flashrom/sst49lf040.c
===================================================================
--- util/flashrom/sst49lf040.c  (revision 2434)
+++ util/flashrom/sst49lf040.c  (working copy)
@@ -59,13 +59,11 @@
                erase_sector_jedec(bios, i * page_size);

                /* write to the sector */
-               if((i&0xfff)==0xfff)
-                       printf("%04d at address: 0x%08x ", i, i * page_size);
+               printf("%04d at address: 0x%08x ", i, i * page_size);

                write_sector_jedec(bios, buf + i * page_size,
                                   bios + i * page_size, page_size);
-               if((i&0xfff)==0xfff)
-                       printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
+               printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
                fflush(stdout);
        }
        printf("\n");




More information about the coreboot mailing list