Convert all flashchips.c entries with SPI programing to the 256-byte version by default
Change the flashchips entry for SST SST25VF080B to 1-byte writing.
Tested-by: Ali Nadalizadeh.
Corresponding to flashrom svn r486.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
diff --git a/flash.h b/flash.h
index 2b305b4..5736516 100644
--- a/flash.h
+++ b/flash.h
@@ -618,7 +618,7 @@
int spi_block_erase_52(const struct flashchip *flash, unsigned long addr);
int spi_block_erase_d8(const struct flashchip *flash, unsigned long addr);
int spi_chip_write_1(struct flashchip *flash, uint8_t *buf);
-int spi_chip_write(struct flashchip *flash, uint8_t *buf);
+int spi_chip_write_256(struct flashchip *flash, uint8_t *buf);
int spi_chip_read(struct flashchip *flash, uint8_t *buf);
uint8_t spi_read_status_register(void);
int spi_disable_blockprotect(void);
diff --git a/flashchips.c b/flashchips.c
index 8ec0845..e49a2b9 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -159,7 +159,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -173,7 +173,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -187,7 +187,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -201,7 +201,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -215,7 +215,7 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -229,7 +229,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -243,7 +243,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -257,7 +257,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -271,7 +271,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -285,7 +285,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -313,7 +313,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -327,7 +327,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -341,7 +341,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -356,7 +356,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},*/
@@ -566,7 +566,7 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid4,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -762,7 +762,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -776,7 +776,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -790,7 +790,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -804,7 +804,7 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -818,7 +818,7 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -832,7 +832,7 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -846,7 +846,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -860,7 +860,7 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -874,7 +874,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -888,7 +888,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -902,7 +902,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -958,7 +958,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_d8,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -972,7 +972,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_d8,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -986,7 +986,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_d8,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1000,7 +1000,7 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_d8,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1014,7 +1014,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_d8,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1028,7 +1028,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1042,7 +1042,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1056,7 +1056,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1070,7 +1070,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1084,7 +1084,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1098,7 +1098,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1154,7 +1154,7 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1168,7 +1168,7 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.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,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1196,7 +1196,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.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,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1238,7 +1238,7 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_60_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_1,
.read = spi_chip_read,
},
@@ -1616,7 +1616,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1630,7 +1630,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1644,7 +1644,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1658,7 +1658,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1672,7 +1672,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_res,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1686,7 +1686,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1700,7 +1700,7 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1714,7 +1714,7 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1728,7 +1728,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -1742,7 +1742,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -2022,7 +2022,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -2036,7 +2036,7 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -2050,7 +2050,7 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
@@ -2064,7 +2064,7 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
- .write = spi_chip_write,
+ .write = spi_chip_write_256,
.read = spi_chip_read,
},
diff --git a/spi.c b/spi.c
index 4888504..0bc7ee7 100644
--- a/spi.c
+++ b/spi.c
@@ -644,7 +644,7 @@
* Program chip using page (256 bytes) programming.
* Some SPI masters can't do this, they use single byte programming instead.
*/
-int spi_chip_write(struct flashchip *flash, uint8_t *buf)
+int spi_chip_write_256(struct flashchip *flash, uint8_t *buf)
{
switch (flashbus) {
case BUS_TYPE_IT87XX_SPI: