i've tried using flashrom for reading the SPI Flash of my Thinkpad X60s.
It seems like it is using the (yet) unsupported M25P16.RES.
I've added the few lines required to get it working, and at least
reading the Flash works. Haven't tried writing the Flash (yes, i know
about the risk regarding EC and friends) ;-)

Signed-off-by: Sven Schnelle <[email protected]>

Index: flashchips.c
===================================================================
--- flashchips.c        (revision 1246)
+++ flashchips.c        (working copy)
@@ -6188,9 +6188,33 @@
                .write          = spi_chip_write_256,
                .read           = spi_chip_read,
        },
-
        {
                .vendor         = "ST",
+               .name           = "M25P16.RES",
+               .bustype        = CHIP_BUSTYPE_SPI,
+               .manufacture_id = 0, /* Unused */
+               .model_id       = ST_M25P16_RES,
+               .total_size     = 2048,
+               .page_size      = 256,
+               .tested         = TEST_OK_PR,
+               .probe          = probe_spi_res1,
+               .probe_timing   = TIMING_ZERO,
+               .block_erasers  =
+               {
+                       {
+                               .eraseblocks = { {64 * 1024, 32} },
+                               .block_erase = spi_block_erase_d8,
+                       }, {
+                               .eraseblocks = { {2 * 1024 * 1024, 1} },
+                               .block_erase = spi_block_erase_c7,
+                       }
+               },
+               .unlock         = spi_disable_blockprotect,
+               .write          = spi_chip_write_256,
+               .read           = spi_chip_read,
+       },
+       {
+               .vendor         = "ST",
                .name           = "M25P32",
                .bustype        = CHIP_BUSTYPE_SPI,
                .manufacture_id = ST_ID,
Index: flashchips.h
===================================================================
--- flashchips.h        (revision 1246)
+++ flashchips.h        (working copy)
@@ -528,6 +528,7 @@
 #define ST_M25P40_RES          0x12
 #define ST_M25P80              0x2014
 #define ST_M25P16              0x2015
+#define ST_M25P16_RES          0x14
 #define ST_M25P32              0x2016
 #define ST_M25P64              0x2017
 #define ST_M25P128             0x2018


-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to