SST25 chips do not support page program, only byte program.
Downgrade the chips from 256-byte writes to 1-byte writes. This fixes writing to them on ICH/VIA SPI masters.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-sst_1byte_write/flashchips.c =================================================================== --- flashrom-sst_1byte_write/flashchips.c (Revision 498) +++ flashrom-sst_1byte_write/flashchips.c (Arbeitskopie) @@ -1168,7 +1168,7 @@ .tested = TEST_OK_PREW, .probe = probe_spi_rdid, .erase = spi_chip_erase_c7, - .write = spi_chip_write_256, + .write = spi_chip_write_1, .read = spi_chip_read, },
@@ -1182,7 +1182,7 @@ .tested = TEST_OK_PREW, .probe = probe_spi_rdid, .erase = spi_chip_erase_c7, - .write = spi_chip_write_256, + .write = spi_chip_write_1, .read = spi_chip_read, },
@@ -1196,7 +1196,7 @@ .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .erase = spi_chip_erase_c7, - .write = spi_chip_write_256, + .write = spi_chip_write_1, .read = spi_chip_read, },
@@ -1210,7 +1210,7 @@ .tested = TEST_OK_PR, .probe = probe_spi_rems, .erase = spi_chip_erase_60, - .write = spi_chip_write_256, + .write = spi_chip_write_1, .read = spi_chip_read, },
@@ -1224,7 +1224,7 @@ .tested = TEST_OK_PR, .probe = probe_spi_rems, .erase = spi_chip_erase_c7, - .write = spi_aai_write, + .write = spi_chip_write_1, .read = spi_chip_read, },
Carl-Daniel Hailfinger wrote:
Downgrade the chips from 256-byte writes to 1-byte writes. This fixes writing to them on ICH/VIA SPI masters.
Acked-by: FENG Yu Ning fengyuning1984@gmail.com
Some other issue. write_256 really means write_pagesize in ichspi. Maybe comment it somewhere?
yu ning
On 13.05.2009 16:38, FENG Yu Ning wrote:
Carl-Daniel Hailfinger wrote:
Downgrade the chips from 256-byte writes to 1-byte writes. This fixes writing to them on ICH/VIA SPI masters.
Acked-by: FENG Yu Ning fengyuning1984@gmail.com
Thanks, committed in r504.
Some other issue. write_256 really means write_pagesize in ichspi. Maybe comment it somewhere?
The write size of write_256 in ichspi depends on many things, among them the chipset (VIA or Intel)...
We need one additional member is struct flashchip which stores the maximum write size for SPI. int flashchip.chipdata.spi.max02writesize;
That would allow us to have only one spi_chip_write function.
Regards, Carl-Daniel