diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2013-03-04 01:20:28 +0000 |
---|---|---|
committer | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2013-03-04 01:20:28 +0000 |
commit | c54adc5852fe9b96127506ca4602aa19eb607fe9 (patch) | |
tree | 2460dd695cd9e65d036f3d9c636fc1353106e1a5 /flashchips.c | |
parent | 50d67aaa79441e8043aa1de32bb40ae94fcc51b2 (diff) | |
download | flashrom-c54adc5852fe9b96127506ca4602aa19eb607fe9.tar.gz flashrom-c54adc5852fe9b96127506ca4602aa19eb607fe9.tar.bz2 flashrom-c54adc5852fe9b96127506ca4602aa19eb607fe9.zip |
Add M25P20-old
This older (ST-branded) revision of M25P20 chip does not support RDID and
hence was not detected correctly. This patch adds a workaround similar
to M25P40-old.
Corresponding to flashrom svn r1652.
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'flashchips.c')
-rw-r--r-- | flashchips.c | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/flashchips.c b/flashchips.c index d4ab1be52..1c28cb51e 100644 --- a/flashchips.c +++ b/flashchips.c @@ -8298,7 +8298,7 @@ const struct flashchip flashchips[] = { }, { - .vendor = "ST", + .vendor = "ST", /* Numonyx */ .name = "M25P20", .bustype = BUS_SPI, .manufacture_id = ST_ID, @@ -8319,10 +8319,39 @@ const struct flashchip flashchips[] = { .block_erase = spi_block_erase_c7, } }, - .printlock = spi_prettyprint_status_register_default_bp3, /* TODO: check */ + .printlock = spi_prettyprint_status_register_default_bp1, .unlock = spi_disable_blockprotect, .write = spi_chip_write_256, - .read = spi_chip_read, + .read = spi_chip_read, /* Fast read (0x0B) supported */ + .voltage = {2700, 3600}, + }, + + { + .vendor = "ST", + .name = "M25P20-old", + .bustype = BUS_SPI, + .manufacture_id = 0, /* Not used. */ + .model_id = ST_M25P20_RES, + .total_size = 256, + .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, + .tested = TEST_OK_PREW, + .probe = probe_spi_res1, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {64 * 1024, 4} }, + .block_erase = spi_block_erase_d8, + }, { + .eraseblocks = { {256 * 1024, 1} }, + .block_erase = spi_block_erase_c7, + } + }, + .printlock = spi_prettyprint_status_register_default_bp1, + .unlock = spi_disable_blockprotect, + .write = spi_chip_write_256, + .read = spi_chip_read, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, |