Hi Sven,
[adding flashrom(a)flashrom.org to CC]
thanks for your patch.
Please note that a huge number of incompatible chips share the same RES
ID. A quick glance at my datasheet collection (I stopped after 5
minutes) resulted in the following matches:
AMIC A25L016, A25L16P
Eon EN25P16
ESMT F25L016A
Generalplus GPR25L161B
Macronix MX25L1605*, MX25L1635*
PMC Pm25LV016B
Spansion S25FL016A
ST M25P16
Winbond W25Q16*
Are you 100% sure you have a ST M25P16?
Regards,
Carl-Daniel
Your mail follows unqoted so flashrom patchwork will pick it up.
On 06.12.2010 17:04, Sven Schnelle wrote:
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 <svens(a)stackframe.org>
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