Author: stefanct Date: Mon Mar 4 02:20:28 2013 New Revision: 1652 URL: http://flashrom.org/trac/flashrom/changeset/1652
Log: 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.
Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com Acked-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at
Modified: trunk/flashchips.c trunk/flashchips.h
Modified: trunk/flashchips.c ============================================================================== --- trunk/flashchips.c Mon Mar 4 00:49:48 2013 (r1651) +++ trunk/flashchips.c Mon Mar 4 02:20:28 2013 (r1652) @@ -8298,7 +8298,7 @@ },
{ - .vendor = "ST", + .vendor = "ST", /* Numonyx */ .name = "M25P20", .bustype = BUS_SPI, .manufacture_id = ST_ID, @@ -8319,10 +8319,39 @@ .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, /* 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, + .read = spi_chip_read, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, },
Modified: trunk/flashchips.h ============================================================================== --- trunk/flashchips.h Mon Mar 4 00:49:48 2013 (r1651) +++ trunk/flashchips.h Mon Mar 4 02:20:28 2013 (r1652) @@ -572,6 +572,7 @@ #define ST_M25P10A 0x2011 #define ST_M25P10_RES 0x10 /* Same code as M25P05. */ #define ST_M25P20 0x2012 +#define ST_M25P20_RES 0x11 #define ST_M25P40 0x2013 #define ST_M25P40_RES 0x12 #define ST_M25P80 0x2014