summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2022-08-16 11:48:40 +1000
committerFelix Singer <felixsinger@posteo.net>2022-11-01 01:15:55 +0000
commit985ad5623f8c2695ffc07d4bdbacbf2d85d4c11a (patch)
tree5daf0509a2d95fc2c9bffd77f562c2e14eb80bc0
parent10e7a0ebd74db72f00b8fc1b741f411d5a49b92d (diff)
downloadflashrom-985ad5623f8c2695ffc07d4bdbacbf2d85d4c11a.tar.gz
flashrom-985ad5623f8c2695ffc07d4bdbacbf2d85d4c11a.tar.bz2
flashrom-985ad5623f8c2695ffc07d4bdbacbf2d85d4c11a.zip
tree/: Convert flashchip write func ptr to enumerate
This forges the way for flashchips.c to be pure declarative data and lookup functions for dispatch to be pure. This means that the flashchips data could be extracted out to be agnostic data of the flashrom code and algorithms. TEST='R|W|E && --flash-name' on ARM, AMD & Intel DUT's. Change-Id: I80149de169464b204fb09f1424a86fc645b740fd Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66782 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nikolai Artemiev <nartemiev@google.com> Reviewed-by: Felix Singer <felixsinger@posteo.net>
-rw-r--r--flashchips.c1178
-rw-r--r--flashrom.c40
-rw-r--r--include/flash.h19
-rw-r--r--sfdp.c4
-rw-r--r--tests/chip.c10
-rw-r--r--tests/chip_wp.c2
-rw-r--r--tests/spi25.c2
7 files changed, 656 insertions, 599 deletions
diff --git a/flashchips.c b/flashchips.c
index 3b1c3d52a..5003fab24 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -83,7 +83,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
},
@@ -115,7 +115,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
},
@@ -142,7 +142,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -169,7 +169,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -196,7 +196,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -223,7 +223,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -250,7 +250,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -277,7 +277,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -304,7 +304,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -335,7 +335,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600}, /* 3.0-3.6V for type -45R, others 2.7-3.6V */
},
@@ -366,7 +366,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600}, /* 3.0-3.6V for type -45R, others 2.7-3.6V */
},
@@ -398,7 +398,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600}, /* 3.0-3.6V for type -55, others 2.7-3.6V */
},
@@ -430,7 +430,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600}, /* 3.0-3.6V for type -55, others 2.7-3.6V */
},
@@ -462,7 +462,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -494,7 +494,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -526,7 +526,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600}, /* 3.0-3.6V for type -70R, others 2.7-3.6V */
},
@@ -558,7 +558,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600}, /* 3.0-3.6V for type -70R, others 2.7-3.6V */
},
@@ -585,7 +585,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600}, /* 3.0-3.6V for type -60R, others 2.7-3.6V*/
},
@@ -612,7 +612,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600}, /* 3.0-3.6V for type -70R, others 2.7-3.6V */
},
@@ -644,7 +644,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -676,7 +676,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -708,7 +708,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -747,7 +747,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_amic_a25l032, /* bit5: T/B, bit6: prot size */
.unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -779,7 +779,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -813,7 +813,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp1_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -847,7 +847,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp1_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -879,7 +879,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -914,7 +914,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp1_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -949,7 +949,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp1_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -987,7 +987,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -1025,7 +1025,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -1060,7 +1060,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp1_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -1095,7 +1095,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp1_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -1135,7 +1135,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -1170,7 +1170,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -1202,7 +1202,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -1237,7 +1237,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -1277,7 +1277,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_amic_a25l032, /* bit5: T/B, bit6: prot size */
.unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -1317,7 +1317,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_amic_a25l032, /* bit5: T/B, bit6: prot size */
.unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -1358,7 +1358,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enhance (sic!) */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -1390,7 +1390,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -1422,7 +1422,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -1449,7 +1449,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -1477,7 +1477,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = unlock_regspace2_uniform_64k,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -1516,7 +1516,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at25df,
.unlock = spi_disable_blockprotect_at2x_global_unprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600}, /* 2.3-3.6V & 2.7-3.6V models available */
},
@@ -1555,7 +1555,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at25df,
.unlock = spi_disable_blockprotect_at2x_global_unprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 3600},
},
@@ -1593,7 +1593,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at25df,
.unlock = spi_disable_blockprotect_at2x_global_unprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600}, /* 2.3-3.6V & 2.7-3.6V models available */
},
@@ -1631,7 +1631,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at25df,
.unlock = spi_disable_blockprotect_at2x_global_unprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1600, 2000}, /* Datasheet says range is 1.65-1.95 V */
},
@@ -1669,7 +1669,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at25df_sec,
.unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -1707,7 +1707,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at25df_sec,
.unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -1746,7 +1746,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at25df,
.unlock = spi_disable_blockprotect_at2x_global_unprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -1785,7 +1785,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at25df_sec,
.unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -1823,7 +1823,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at25df_sec,
.unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -1862,7 +1862,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at25df_sec,
.unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
- .write = spi_chip_write_256, /* Dual I/O (0xA2) supported */
+ .write = SPI_CHIP_WRITE256, /* Dual I/O (0xA2) supported */
.read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
.voltage = {1650, 1950},
},
@@ -1901,7 +1901,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at25df_sec,
.unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
- .write = spi_chip_write_256, /* Dual I/O (0xA2) supported */
+ .write = SPI_CHIP_WRITE256, /* Dual I/O (0xA2) supported */
.read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
.voltage = {1650, 1950},
},
@@ -1940,7 +1940,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at25df_sec,
.unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -1971,7 +1971,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at25f,
.unlock = spi_disable_blockprotect_at25f,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -2000,7 +2000,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at25f,
.unlock = spi_disable_blockprotect_at25f,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -2030,7 +2030,7 @@ const struct flashchip flashchips[] = {
.printlock = spi_prettyprint_status_register_at25f4096,
/* "Bits 5-6 are 0s when device is not in an internal write cycle." Better leave them alone: */
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -2059,7 +2059,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at25f,
.unlock = spi_disable_blockprotect_at25f,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -2089,7 +2089,7 @@ const struct flashchip flashchips[] = {
.printlock = spi_prettyprint_status_register_at25f512a,
/* FIXME: It is not correct to use this one, because the BP1 bit is N/A. */
.unlock = spi_disable_blockprotect_at25f512a,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -2131,7 +2131,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at25f512b,
.unlock = spi_disable_blockprotect_at25f512b,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -2172,7 +2172,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at25fs010,
.unlock = spi_disable_blockprotect_at25fs010,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -2210,7 +2210,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at25fs040,
.unlock = spi_disable_blockprotect_at25fs040,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -2248,7 +2248,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2500, 3600},
},
@@ -2286,7 +2286,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2300, 3600},
},
@@ -2324,7 +2324,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1700, 2000},
},
@@ -2362,7 +2362,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2500, 3600},
},
@@ -2400,7 +2400,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2500, 3600},
},
@@ -2439,7 +2439,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1700, 2000},
.reg_bits =
@@ -2481,7 +2481,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain,
/* Supports also an incompatible page write (of exactly 256 B) and an auto-erasing write. */
- .write = spi_chip_write_1,
+ .write = SPI_CHIP_WRITE1,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600}, /* 3.0-3.6V for higher speed, 2.7-3.6V normal */
},
@@ -2519,7 +2519,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at26df081a,
.unlock = spi_disable_blockprotect_at2x_global_unprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -2557,7 +2557,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at25df,
.unlock = spi_disable_blockprotect_at2x_global_unprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -2595,7 +2595,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_at26df081a,
.unlock = spi_disable_blockprotect_at2x_global_unprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -2632,7 +2632,7 @@ const struct flashchip flashchips[] = {
}
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
- .write = NULL, /* Incompatible Page write */
+ .write = 0, /* Incompatible Page write */
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -2656,7 +2656,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec, /* FIXME */
+ .write = WRITE_JEDEC, /* FIXME */
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -2680,7 +2680,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec,
+ .write = WRITE_JEDEC,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -2704,7 +2704,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec,
+ .write = WRITE_JEDEC,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -2728,7 +2728,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec,
+ .write = WRITE_JEDEC,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -2759,7 +2759,7 @@ const struct flashchip flashchips[] = {
}
},
.printlock = spi_prettyprint_status_register_plain,
- .write = spi_write_at45db,
+ .write = SPI_WRITE_AT45DB,
.read = spi_read_at45db,
.voltage = {2700, 3600},
.gran = write_gran_1056bytes,
@@ -2802,7 +2802,7 @@ const struct flashchip flashchips[] = {
.printlock = spi_prettyprint_status_register_at45db,
.unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
/* granularity will be set by the probing function. */
- .write = spi_write_at45db,
+ .write = SPI_WRITE_AT45DB,
.read = spi_read_at45db, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -2844,7 +2844,7 @@ const struct flashchip flashchips[] = {
.printlock = spi_prettyprint_status_register_at45db,
.unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
/* granularity will be set by the probing function. */
- .write = spi_write_at45db,
+ .write = SPI_WRITE_AT45DB,
.read = spi_read_at45db, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -2886,7 +2886,7 @@ const struct flashchip flashchips[] = {
.printlock = spi_prettyprint_status_register_at45db,
.unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
/* granularity will be set by the probing function. */
- .write = spi_write_at45db,
+ .write = SPI_WRITE_AT45DB,
.read = spi_read_at45db, /* Fast read (0x0B) supported */
.voltage = {2700, 3600}, /* 2.5-3.6V & 2.7-3.6V models available */
},
@@ -2928,7 +2928,7 @@ const struct flashchip flashchips[] = {
.printlock = spi_prettyprint_status_register_at45db,
.unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
/* granularity will be set by the probing function. */
- .write = spi_write_at45db,
+ .write = SPI_WRITE_AT45DB,
.read = spi_read_at45db, /* Fast read (0x0B) supported */
.voltage = {2700, 3600}, /* 2.5-3.6V & 2.7-3.6V models available */
},
@@ -2970,7 +2970,7 @@ const struct flashchip flashchips[] = {
.printlock = spi_prettyprint_status_register_at45db,
.unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
/* granularity will be set by the probing function. */
- .write = spi_write_at45db,
+ .write = SPI_WRITE_AT45DB,
.read = spi_read_at45db, /* Fast read (0x0B) supported */
.voltage = {2700, 3600}, /* 2.5-3.6V & 2.7-3.6V models available */
},
@@ -3012,7 +3012,7 @@ const struct flashchip flashchips[] = {
}
},
.printlock = spi_prettyprint_status_register_at45db, /* Bit 0 is undefined, no lockdown */
- .write = spi_write_at45db,
+ .write = SPI_WRITE_AT45DB,
.read = spi_read_at45db_e8, /* 3 address and 4 dummy bytes */
.voltage = {2700, 3600},
.gran = write_gran_528bytes,
@@ -3055,7 +3055,7 @@ const struct flashchip flashchips[] = {
.printlock = spi_prettyprint_status_register_at45db,
.unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
/* granularity will be set by the probing function. */
- .write = spi_write_at45db,
+ .write = SPI_WRITE_AT45DB,
.read = spi_read_at45db, /* Fast read (0x0B) supported */
.voltage = {2700, 3600}, /* 2.5-3.6V & 2.7-3.6V models available */
},
@@ -3097,7 +3097,7 @@ const struct flashchip flashchips[] = {
.printlock = spi_prettyprint_status_register_at45db, /* has a 2nd status register */
.unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
/* granularity will be set by the probing function. */
- .write = spi_write_at45db,
+ .write = SPI_WRITE_AT45DB,
.read = spi_read_at45db, /* Fast read (0x0B) supported */
.voltage = {2500, 3600}, /* 2.3-3.6V & 2.5-3.6V models available */
},
@@ -3139,7 +3139,7 @@ const struct flashchip flashchips[] = {
.printlock = spi_prettyprint_status_register_at45db,
.unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
/* granularity will be set by the probing function. */
- .write = spi_write_at45db,
+ .write = SPI_WRITE_AT45DB,
.read = spi_read_at45db, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -3164,7 +3164,7 @@ const struct flashchip flashchips[] = {
}
},
.printlock = printlock_at49f,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -3188,7 +3188,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -3220,7 +3220,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -3252,7 +3252,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -3283,7 +3283,7 @@ const struct flashchip flashchips[] = {
*/
},
.printlock = printlock_at49f,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -3314,7 +3314,7 @@ const struct flashchip flashchips[] = {
*/
},
.printlock = printlock_at49f,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -3345,7 +3345,7 @@ const struct flashchip flashchips[] = {
*/
},
.printlock = printlock_at49f,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -3377,7 +3377,7 @@ const struct flashchip flashchips[] = {
*/
},
.printlock = printlock_at49f,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -3413,7 +3413,7 @@ const struct flashchip flashchips[] = {
},
.printlock = printlock_regspace2_block_eraser_0,
.unlock = unlock_regspace2_block_eraser_0,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -3449,7 +3449,7 @@ const struct flashchip flashchips[] = {
},
.printlock = printlock_regspace2_block_eraser_0,
.unlock = unlock_regspace2_block_eraser_0,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -3485,7 +3485,7 @@ const struct flashchip flashchips[] = {
},
.printlock = printlock_regspace2_block_eraser_0,
.unlock = unlock_regspace2_block_eraser_0,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -3523,7 +3523,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -3561,7 +3561,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain,
.unlock = spi_disable_blockprotect_at25fs040,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -3588,7 +3588,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -3612,7 +3612,7 @@ const struct flashchip flashchips[] = {
.block_erase = NULL, /* TODO */
},
},
- .write = NULL, /* TODO */
+ .write = 0, /* TODO */
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -3635,7 +3635,7 @@ const struct flashchip flashchips[] = {
.block_erase = edi_chip_block_erase,
},
},
- .write = edi_chip_write,
+ .write = EDI_CHIP_WRITE,
.read = edi_chip_read,
.voltage = {2700, 3600},
.gran = write_gran_128bytes,
@@ -3667,7 +3667,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast Read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -3698,7 +3698,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast Read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -3729,7 +3729,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast Read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -3764,7 +3764,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_1,
+ .write = SPI_CHIP_WRITE1,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -3799,7 +3799,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_bpl,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -3831,7 +3831,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -3865,7 +3865,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -3899,7 +3899,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -3933,7 +3933,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -3967,7 +3967,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4002,7 +4002,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4037,7 +4037,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4072,7 +4072,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4107,7 +4107,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4143,7 +4143,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4179,7 +4179,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4214,7 +4214,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4249,7 +4249,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4285,7 +4285,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4321,7 +4321,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4356,7 +4356,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4391,7 +4391,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4429,7 +4429,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -4467,7 +4467,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -4502,7 +4502,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -4540,7 +4540,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -4575,7 +4575,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -4610,7 +4610,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -4645,7 +4645,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -4680,7 +4680,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -4710,7 +4710,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4739,7 +4739,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4768,7 +4768,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4797,7 +4797,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4827,7 +4827,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4856,7 +4856,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4886,7 +4886,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4915,7 +4915,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -4951,7 +4951,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
},
@@ -4992,7 +4992,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -5028,7 +5028,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -5064,7 +5064,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -5100,7 +5100,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -5136,7 +5136,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -5174,7 +5174,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
.reg_bits =
@@ -5219,7 +5219,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -5257,7 +5257,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -5295,7 +5295,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -5331,7 +5331,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950},
},
@@ -5370,7 +5370,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_en25s_wp,
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950},
},
@@ -5406,7 +5406,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950},
},
@@ -5445,7 +5445,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_en25s_wp,
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950},
},
@@ -5481,7 +5481,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950},
},
@@ -5517,7 +5517,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_en25s_wp,
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950},
},
@@ -5553,7 +5553,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950},
},
@@ -5585,7 +5585,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -5617,7 +5617,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -5645,7 +5645,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -5675,7 +5675,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -5705,7 +5705,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -5732,7 +5732,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -5759,7 +5759,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -5786,7 +5786,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600}, /* 3.0-3.6V for type -45R and 55R, others 2.7-3.6V */
},
@@ -5816,7 +5816,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_en29lv640b,
+ .write = WRITE_EN29LV640B,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -5854,7 +5854,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_tb_bpl,
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
.voltage = {2700, 3600}, /* 2.3-2.7V acceptable results in lower performance */
},
@@ -5892,7 +5892,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_tb_bpl,
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
.voltage = {2700, 3600}, /* 2.3-2.7V acceptable results in lower performance */
},
@@ -5930,7 +5930,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_tb_bpl,
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
.voltage = {2700, 3600}, /* 2.3-2.7V acceptable results in lower performance */
},
@@ -5968,7 +5968,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_tb_bpl,
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
.voltage = {2700, 3600},
},
@@ -6008,7 +6008,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -6048,7 +6048,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -6088,7 +6088,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -6120,7 +6120,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = NULL,
+ .write = 0,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -6152,7 +6152,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = NULL,
+ .write = 0,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -6185,7 +6185,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
},
@@ -6217,7 +6217,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
},
@@ -6249,7 +6249,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1, /* Supports a fast mode too */
+ .write = WRITE_JEDEC1, /* Supports a fast mode too */
.read = read_memmapped,
.voltage = {3000, 3600}, /* 3.0-3.6V for type -70, others 2.7-3.6V */
},
@@ -6281,7 +6281,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1, /* Supports a fast mode too */
+ .write = WRITE_JEDEC1, /* Supports a fast mode too */
.read = read_memmapped,
.voltage = {3000, 3600}, /* 3.0-3.6V for type -70, others 2.7-3.6V */
},
@@ -6320,7 +6320,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -6359,7 +6359,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1695, 1950},
.reg_bits =
@@ -6408,7 +6408,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1695, 1950},
},
@@ -6447,7 +6447,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1695, 1950},
},
@@ -6486,7 +6486,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1695, 1950},
},
@@ -6525,7 +6525,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1695, 1950},
.reg_bits =
@@ -6574,7 +6574,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1695, 1950},
},
@@ -6612,7 +6612,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -6653,7 +6653,7 @@ const struct flashchip flashchips[] = {
/* TODO: 2nd status reg (read 0x35, write 0x31) and 3rd status reg (read 0x15, write 0x11) */
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
.reg_bits =
@@ -6702,7 +6702,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -6740,7 +6740,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -6788,7 +6788,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
.reg_bits =
@@ -6835,7 +6835,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
.reg_bits =
@@ -6883,7 +6883,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -6918,7 +6918,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -6957,7 +6957,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
.reg_bits =
@@ -7006,7 +7006,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -7045,7 +7045,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -7085,7 +7085,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2300, 3600},
},
@@ -7124,7 +7124,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2300, 3600},
},
@@ -7164,7 +7164,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2300, 3600},
},
@@ -7203,7 +7203,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2300, 3600},
},
@@ -7243,7 +7243,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2300, 3600},
},
@@ -7281,7 +7281,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 3600},
},
@@ -7313,7 +7313,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4750, 5250}, /* 4.75-5.25V for type -45, others 4.5-5.5V */
},
@@ -7345,7 +7345,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4750, 5250}, /* 4.75-5.25V for type -45, others 4.5-5.5V */
},
@@ -7372,7 +7372,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -7413,7 +7413,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2300, 3600},
},
@@ -7454,7 +7454,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2300, 3600},
},
@@ -7504,7 +7504,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2300, 3600},
},
@@ -7546,7 +7546,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950},
},
@@ -7588,7 +7588,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950},
},
@@ -7630,7 +7630,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950},
},
@@ -7680,7 +7680,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950},
},
@@ -7710,7 +7710,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -7737,7 +7737,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -7767,7 +7767,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -7794,7 +7794,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -7833,7 +7833,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_ep_srwd,
.unlock = spi_disable_blockprotect_bp2_ep_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* also fast read 0x0B */
.voltage = {2700, 3600},
},
@@ -7872,7 +7872,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_ep_srwd,
.unlock = spi_disable_blockprotect_bp2_ep_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* also fast read 0x0B */
.voltage = {2700, 3600},
},
@@ -7911,7 +7911,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_ep_srwd,
.unlock = spi_disable_blockprotect_bp2_ep_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* also fast read 0x0B */
.voltage = {2700, 3600},
},
@@ -7950,7 +7950,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_ep_srwd,
.unlock = spi_disable_blockprotect_bp2_ep_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* also fast read 0x0B */
.voltage = {2700, 3600},
},
@@ -7989,7 +7989,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_ep_srwd,
.unlock = spi_disable_blockprotect_bp2_ep_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* also fast read 0x0B */
.voltage = {2700, 3600},
},
@@ -8028,7 +8028,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_ep_srwd,
.unlock = spi_disable_blockprotect_bp2_ep_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* also fast read 0x0B */
.voltage = {2700, 3600},
},
@@ -8055,7 +8055,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_block_82802ab,
},
},
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -8082,7 +8082,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_block_82802ab,
},
},
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -8110,7 +8110,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_block_82802ab,
},
},
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
},
@@ -8137,7 +8137,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_block_82802ab,
},
},
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
},
@@ -8164,7 +8164,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_block_82802ab,
},
},
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
},
@@ -8187,7 +8187,7 @@ const struct flashchip flashchips[] = {
},
},
.unlock = unlock_28f004s5,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
},
@@ -8215,7 +8215,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_block_82802ab,
},
},
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
},
@@ -8243,7 +8243,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_block_82802ab,
},
},
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
},
@@ -8267,7 +8267,7 @@ const struct flashchip flashchips[] = {
},
},
.unlock = unlock_regspace2_uniform_64k,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -8292,7 +8292,7 @@ const struct flashchip flashchips[] = {
},
},
.unlock = unlock_regspace2_uniform_64k,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -8308,7 +8308,7 @@ const struct flashchip flashchips[] = {
.tested = {.probe = NT, .read = NT, .erase = NA, .write = NA},
.probe = PROBE_SPI_RDID,
.probe_timing = TIMING_ZERO,
- .write = NULL, /* MX23L12854 is a mask ROM, so it is read-only */
+ .write = 0, /* MX23L12854 is a mask ROM, so it is read-only */
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {3000, 3600},
},
@@ -8324,7 +8324,7 @@ const struct flashchip flashchips[] = {
.tested = {.probe = NT, .read = NT, .erase = NA, .write = NA},
.probe = PROBE_SPI_RDID,
.probe_timing = TIMING_ZERO,
- .write = NULL, /* MX23L1654 is a mask ROM, so it is read-only */
+ .write = 0, /* MX23L1654 is a mask ROM, so it is read-only */
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {3000, 3600},
},
@@ -8340,7 +8340,7 @@ const struct flashchip flashchips[] = {
.tested = {.probe = OK, .read = OK, .erase = NA, .write = NA},
.probe = PROBE_SPI_RDID,
.probe_timing = TIMING_ZERO,
- .write = NULL, /* MX23L3254 is a mask ROM, so it is read-only */
+ .write = 0, /* MX23L3254 is a mask ROM, so it is read-only */
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {3000, 3600},
},
@@ -8356,7 +8356,7 @@ const struct flashchip flashchips[] = {
.tested = {.probe = OK, .read = OK, .erase = NA, .write = NA},
.probe = PROBE_SPI_RDID,
.probe_timing = TIMING_ZERO,
- .write = NULL, /* MX23L6454 is a mask ROM, so it is read-only */
+ .write = 0, /* MX23L6454 is a mask ROM, so it is read-only */
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {3000, 3600},
},
@@ -8392,7 +8392,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp1_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported, MX25L1006E supports dual I/O */
.voltage = {2700, 3600},
},
@@ -8428,7 +8428,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd,
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -8468,7 +8468,7 @@ const struct flashchip flashchips[] = {
/* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -8503,7 +8503,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd, /* bit6: error flag */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -8542,7 +8542,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* MX25L1605A bp2 only */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported (MX25L1608E supports dual-I/O read) */
.voltage = {2700, 3600},
},
@@ -8577,7 +8577,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: Continuously Program (CP) mode, for 73E is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
.voltage = {2700, 3600},
},
@@ -8613,7 +8613,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -8649,7 +8649,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -8687,7 +8687,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp1_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -8736,7 +8736,7 @@ const struct flashchip flashchips[] = {
/* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -8771,7 +8771,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd, /* bit6: error flag */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -8807,7 +8807,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: continuously program mode */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and dual I/O supported */
.voltage = {2700, 3600},
},
@@ -8846,7 +8846,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd,
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and dual I/O supported */
.voltage = {2700, 3600},
},
@@ -8882,7 +8882,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -8921,7 +8921,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd,
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and dual I/O supported */
.voltage = {2700, 3600}, /* 33F 2.65V..3.6V */
},
@@ -8959,7 +8959,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -8998,7 +8998,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp1_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported, MX25L512E supports dual I/O */
.voltage = {2700, 3600}, /* 2.35-3.6V for MX25V512(C) */
},
@@ -9036,7 +9036,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp1_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -9072,7 +9072,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: error flag */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -9108,7 +9108,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: continuously program mode */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0xBB) supported */
.voltage = {2700, 3600},
},
@@ -9148,7 +9148,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd,
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual I/O read supported */
.voltage = {2700, 3600},
},
@@ -9188,7 +9188,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -9226,7 +9226,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -9266,7 +9266,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600}, /* 2.35-3.6V for MX25V8005 */
},
@@ -9305,7 +9305,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit 6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1650, 3600},
},
@@ -9344,7 +9344,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1650, 3600},
},
@@ -9384,7 +9384,7 @@ const struct flashchip flashchips[] = {
/* TODO: security register */
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1650, 2000},
},
@@ -9425,7 +9425,7 @@ const struct flashchip flashchips[] = {
/* TODO: security register */
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1650, 2000},
},
@@ -9474,7 +9474,7 @@ const struct flashchip flashchips[] = {
/* TODO: security register */
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1650, 2000},
},
@@ -9516,7 +9516,7 @@ const struct flashchip flashchips[] = {
/* TODO: security register */
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1650, 2000},
},
@@ -9565,7 +9565,7 @@ const struct flashchip flashchips[] = {
/* TODO: security register */
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1650, 2000},
},
@@ -9607,7 +9607,7 @@ const struct flashchip flashchips[] = {
/* TODO: security register */
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1650, 2000},
},
@@ -9647,7 +9647,7 @@ const struct flashchip flashchips[] = {
/* TODO: security register */
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1650, 2000},
},
@@ -9680,7 +9680,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -9713,7 +9713,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -9745,7 +9745,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -9777,7 +9777,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -9809,7 +9809,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -9841,7 +9841,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -9868,7 +9868,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -9895,7 +9895,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -9925,7 +9925,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -9952,7 +9952,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -9982,7 +9982,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -10012,7 +10012,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -10039,7 +10039,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -10069,7 +10069,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -10096,7 +10096,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -10145,7 +10145,7 @@ const struct flashchip flashchips[] = {
/* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -10194,7 +10194,7 @@ const struct flashchip flashchips[] = {
/* TODO: security register and SBLK/SBULK, configuration register */
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -10228,7 +10228,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_1, /* 128 */
+ .write = SPI_CHIP_WRITE1, /* 128 */
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -10257,7 +10257,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -10287,7 +10287,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_1, /* 128 */
+ .write = SPI_CHIP_WRITE1, /* 128 */
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -10316,7 +10316,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -10345,7 +10345,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -10374,7 +10374,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -10403,7 +10403,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp1_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -10432,7 +10432,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp1_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -10461,7 +10461,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -10490,7 +10490,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -10519,7 +10519,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
},
@@ -10547,7 +10547,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -10576,7 +10576,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -10608,7 +10608,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -10640,7 +10640,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -10672,7 +10672,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -10704,7 +10704,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -10736,7 +10736,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -10769,7 +10769,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
.unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2300, 3600},
},
@@ -10802,7 +10802,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
.unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -10835,7 +10835,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
.unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -10868,7 +10868,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
.unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -10896,7 +10896,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_default_welwip,
.unlock = NULL, /* #WP pin write-protects lower 64kB. */
- .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
+ .write = SPI_CHIP_WRITE256, /* Page write (similar to PP but allows 0->1 changes) */
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -10924,7 +10924,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_default_welwip,
.unlock = NULL, /* #WP pin write-protects lower 64kB. */
- .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
+ .write = SPI_CHIP_WRITE256, /* Page write (similar to PP but allows 0->1 changes) */
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -10952,7 +10952,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_default_welwip,
.unlock = NULL, /* #WP pin write-protects lower 64kB. */
- .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
+ .write = SPI_CHIP_WRITE256, /* Page write (similar to PP but allows 0->1 changes) */
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -10980,7 +10980,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_default_welwip,
.unlock = NULL, /* #WP pin write-protects lower 64kB. */
- .write = spi_chip_write_256, /* Page write supported (similar to PP but allows 0->1 changes) */
+ .write = SPI_CHIP_WRITE256, /* Page write supported (similar to PP but allows 0->1 changes) */
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -11008,7 +11008,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_default_welwip,
.unlock = NULL, /* #WP pin write-protects lower 64kB. */
- .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
+ .write = SPI_CHIP_WRITE256, /* Page write (similar to PP but allows 0->1 changes) */
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -11048,7 +11048,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1700, 2000},
},
@@ -11088,7 +11088,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -11125,7 +11125,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1700, 2000},
},
@@ -11159,7 +11159,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1700, 2000},
},
@@ -11193,7 +11193,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -11227,7 +11227,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1700, 2000},
},
@@ -11261,7 +11261,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -11295,7 +11295,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1700, 2000},
},
@@ -11329,7 +11329,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -11369,7 +11369,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1700, 2000},
},
@@ -11409,7 +11409,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -11449,7 +11449,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1700, 2000},
},
@@ -11489,7 +11489,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -11535,7 +11535,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -11581,7 +11581,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1700, 2000},
},
@@ -11627,7 +11627,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -11673,7 +11673,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1700, 2000},
},
@@ -11713,7 +11713,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1700, 2000},
},
@@ -11753,7 +11753,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -11802,7 +11802,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -11851,7 +11851,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1700, 2000},
},
@@ -11900,7 +11900,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -11949,7 +11949,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
.unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {1700, 2000},
},
@@ -11976,7 +11976,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -12003,7 +12003,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -12030,7 +12030,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -12057,7 +12057,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -12084,7 +12084,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -12111,7 +12111,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -12138,7 +12138,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -12179,7 +12179,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd,
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
.voltage = {2700, 3600},
},
@@ -12214,7 +12214,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd,
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
.voltage = {2700, 3600},
},
@@ -12255,7 +12255,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd,
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
.voltage = {2700, 3600},
},
@@ -12296,7 +12296,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd,
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
.voltage = {2700, 3600},
},
@@ -12334,7 +12334,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd,
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
.voltage = {2700, 3600},
},
@@ -12372,7 +12372,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
.voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD010 */
},
@@ -12410,7 +12410,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
.voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD020 */
},
@@ -12448,7 +12448,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
.voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD040 */
},
@@ -12486,7 +12486,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
.voltage = {2700, 3600},
},
@@ -12524,7 +12524,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
.voltage = {2300, 3600},
},
@@ -12563,7 +12563,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2300, 3600},
},
@@ -12602,7 +12602,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2300, 3600},
},
@@ -12641,7 +12641,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -12680,7 +12680,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2300, 3600},
},
@@ -12719,7 +12719,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2300, 3600},
},
@@ -12751,7 +12751,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp1_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -12783,7 +12783,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp1_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -12821,7 +12821,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -12853,7 +12853,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -12885,7 +12885,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -12923,7 +12923,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -12955,7 +12955,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp1_srwd,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -12987,7 +12987,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -13019,7 +13019,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -13049,7 +13049,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -13079,7 +13079,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -13109,7 +13109,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -13139,7 +13139,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -13170,7 +13170,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = unlock_regspace2_uniform_32k,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -13201,7 +13201,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = unlock_regspace2_uniform_64k,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -13233,7 +13233,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
+ .write = SPI_CHIP_WRITE1, /* AAI supported, but opcode is 0xAF */
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -13265,7 +13265,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
+ .write = SPI_CHIP_WRITE1, /* AAI supported, but opcode is 0xAF */
.read = spi_chip_read,
.voltage = {3000, 3600},
},
@@ -13297,7 +13297,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
+ .write = SPI_CHIP_WRITE1, /* AAI supported, but opcode is 0xAF */
.read = spi_chip_read,
.voltage = {3000, 3600},
},
@@ -13335,7 +13335,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
+ .write = SPI_CHIP_WRITE1, /* AAI supported, but opcode is 0xAF */
.read = spi_chip_read, /* Fast read (0x0B) supported by SST25VF010A only */
.voltage = {2700, 3600},
},
@@ -13373,7 +13373,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_sst25vf016,
.unlock = spi_disable_blockprotect,
- .write = spi_aai_write,
+ .write = SPI_WRITE_AAI,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -13405,7 +13405,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
+ .write = SPI_CHIP_WRITE1, /* AAI supported, but opcode is 0xAF */
.read = spi_chip_read, /* only */
.voltage = {2700, 3600},
},
@@ -13443,7 +13443,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 and 2nd SR */
.unlock = spi_disable_blockprotect, /* FIXME: 2nd SR */
- .write = spi_aai_write, /* AAI supported (0xAD) */
+ .write = SPI_WRITE_AAI, /* AAI supported (0xAD) */
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -13481,7 +13481,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
.unlock = spi_disable_blockprotect,
- .write = spi_aai_write,
+ .write = SPI_WRITE_AAI,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -13513,7 +13513,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
+ .write = SPI_CHIP_WRITE1, /* AAI supported, but opcode is 0xAF */
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -13551,7 +13551,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_sst25vf040b,
.unlock = spi_disable_blockprotect,
- .write = spi_aai_write, /* AAI supported (0xAD) */
+ .write = SPI_WRITE_AAI, /* AAI supported (0xAD) */
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -13589,7 +13589,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_sst25vf040b,
.unlock = spi_disable_blockprotect,
- .write = spi_aai_write,
+ .write = SPI_WRITE_AAI,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -13627,7 +13627,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -13665,7 +13665,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
.unlock = spi_disable_blockprotect,
- .write = spi_aai_write,
+ .write = SPI_WRITE_AAI,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -13703,7 +13703,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
+ .write = SPI_CHIP_WRITE1, /* AAI supported, but opcode is 0xAF */
.read = spi_chip_read, /* Fast read (0x0B) supported by SST25VF512A only */
.voltage = {2700, 3600},
},
@@ -13738,7 +13738,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_aai_write,
+ .write = SPI_WRITE_AAI,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {1650, 1950},
},
@@ -13776,7 +13776,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_aai_write,
+ .write = SPI_WRITE_AAI,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {1650, 1950},
},
@@ -13811,7 +13811,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_tb_bpl,
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {1650, 1950},
},
@@ -13849,7 +13849,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_aai_write,
+ .write = SPI_WRITE_AAI,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {1650, 1950},
},
@@ -13884,7 +13884,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_tb_bpl,
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual O (0x3B), dual I/O read (0xBB) supported */
.voltage = {1650, 1950},
},
@@ -13922,7 +13922,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_sst25, /* *does* have a BP3 but it is useless */
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_aai_write,
+ .write = SPI_WRITE_AAI,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {1650, 1950},
},
@@ -13957,7 +13957,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_tb_bpl,
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual O (0x3B), dual I/O read (0xBB) supported */
.voltage = {1650, 1950},
},
@@ -13992,7 +13992,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_aai_write,
+ .write = SPI_WRITE_AAI,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {1650, 1950},
},
@@ -14030,7 +14030,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect_sst26_global_unprotect,
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -14068,7 +14068,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect_sst26_global_unprotect,
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -14106,7 +14106,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect_sst26_global_unprotect,
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -14134,7 +14134,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = unprotect_28sf040,
- .write = write_28sf040,
+ .write = WRITE_28SF040,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -14158,7 +14158,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec,
+ .write = WRITE_JEDEC,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -14182,7 +14182,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec,
+ .write = WRITE_JEDEC,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -14206,7 +14206,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec,
+ .write = WRITE_JEDEC,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -14230,7 +14230,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec,
+ .write = WRITE_JEDEC,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -14257,7 +14257,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -14284,7 +14284,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -14311,7 +14311,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -14338,7 +14338,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -14365,7 +14365,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -14392,7 +14392,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -14419,7 +14419,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -14449,7 +14449,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -14476,7 +14476,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -14508,7 +14508,7 @@ const struct flashchip flashchips[] = {
},
.printlock = printlock_sst_fwhub,
.unlock = unlock_sst_fwhub,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -14540,7 +14540,7 @@ const struct flashchip flashchips[] = {
},
.printlock = printlock_sst_fwhub,
.unlock = unlock_sst_fwhub,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -14575,7 +14575,7 @@ const struct flashchip flashchips[] = {
},
.printlock = printlock_sst_fwhub,
.unlock = unlock_sst_fwhub,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -14609,7 +14609,7 @@ const struct flashchip flashchips[] = {
},
.printlock = printlock_regspace2_block_eraser_1,
.unlock = unlock_regspace2_block_eraser_1,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -14641,7 +14641,7 @@ const struct flashchip flashchips[] = {
},
.printlock = printlock_sst_fwhub,
.unlock = unlock_sst_fwhub,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -14675,7 +14675,7 @@ const struct flashchip flashchips[] = {
},
.printlock = printlock_regspace2_block_eraser_1,
.unlock = unlock_regspace2_block_eraser_1,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -14709,7 +14709,7 @@ const struct flashchip flashchips[] = {
},
.printlock = printlock_regspace2_block_eraser_1,
.unlock = unlock_regspace2_block_eraser_1,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -14739,7 +14739,7 @@ const struct flashchip flashchips[] = {
.block_erase = NULL,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -14769,7 +14769,7 @@ const struct flashchip flashchips[] = {
.block_erase = NULL,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -14799,7 +14799,7 @@ const struct flashchip flashchips[] = {
.block_erase = NULL,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -14830,7 +14830,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = unlock_regspace2_uniform_64k,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -14860,7 +14860,7 @@ const struct flashchip flashchips[] = {
.block_erase = NULL,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -14894,7 +14894,7 @@ const struct flashchip flashchips[] = {
},
.printlock = printlock_regspace2_block_eraser_1,
.unlock = unlock_regspace2_block_eraser_1,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -14926,7 +14926,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4750, 5250}, /* 4.75-5.25V for type -X, others 4.5-5.5V */
},
@@ -14958,7 +14958,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4750, 5250}, /* 4.75-5.25V for type -X, others 4.5-5.5V */
},
@@ -14985,7 +14985,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -15018,7 +15018,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -15051,7 +15051,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -15078,7 +15078,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -15105,7 +15105,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -15129,7 +15129,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -15162,7 +15162,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = unlock_regspace2_uniform_64k,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program & erase */
},
@@ -15195,7 +15195,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = unlock_regspace2_uniform_64k,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program & erase */
},
@@ -15229,7 +15229,7 @@ const struct flashchip flashchips[] = {
},
.printlock = printlock_regspace2_block_eraser_0,
.unlock = unlock_regspace2_block_eraser_0,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program & erase */
},
@@ -15263,7 +15263,7 @@ const struct flashchip flashchips[] = {
},
.printlock = printlock_regspace2_block_eraser_0,
.unlock = unlock_regspace2_block_eraser_0,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program & erase */
},
@@ -15297,7 +15297,7 @@ const struct flashchip flashchips[] = {
},
.printlock = printlock_regspace2_block_eraser_0,
.unlock = unlock_regspace2_block_eraser_0,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program & erase */
},
@@ -15322,7 +15322,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = unlock_regspace2_uniform_64k,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program & erase */
},
@@ -15347,7 +15347,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = unlock_regspace2_uniform_64k,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program & erase */
},
@@ -15372,7 +15372,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = unlock_regspace2_uniform_64k,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program & erase */
},
@@ -15397,7 +15397,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = unlock_regspace2_uniform_64k,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program & erase */
},
@@ -15429,7 +15429,7 @@ const struct flashchip flashchips[] = {
},
.printlock = printlock_regspace2_block_eraser_0,
.unlock = unlock_regspace2_block_eraser_0,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program & erase */
},
@@ -15456,7 +15456,7 @@ const struct flashchip flashchips[] = {
.printlock = spi_prettyprint_status_register_bp1_srwd,
.unlock = spi_disable_blockprotect_bp1_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2500, 5500},
},
@@ -15490,7 +15490,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp1_srwd,
.unlock = spi_disable_blockprotect_bp1_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2300, 3600},
},
@@ -15522,7 +15522,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp1_srwd,
.unlock = spi_disable_blockprotect_bp1_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2300, 3600},
},
@@ -15559,7 +15559,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2300, 3600},
},
@@ -15591,7 +15591,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2300, 3600},
},
@@ -15629,7 +15629,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B), dual read (0x3B) and dual I/O (0xBB) supported */
.voltage = {2300, 3600},
},
@@ -15661,7 +15661,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp1_srwd, /* FIXME: Add ERSER error flag. */
.unlock = spi_disable_blockprotect_bp1_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -15692,7 +15692,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_default_welwip,
.unlock = NULL, /* #WP pin write-protects lower 64kB. */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -15723,7 +15723,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_default_welwip,
.unlock = NULL, /* #WP pin write-protects lower 64kB. */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -15755,7 +15755,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -15787,7 +15787,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* some quad-read supported ("HD_READ mode") */
.voltage = {2700, 3600},
},
@@ -15822,7 +15822,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -15854,7 +15854,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* some quad-read supported ("HD_READ mode") */
.voltage = {2700, 3600},
},
@@ -15884,7 +15884,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = unlock_lh28f008bjt,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -15917,7 +15917,7 @@ const struct flashchip flashchips[] = {
},
},
.unlock = unlock_regspace2_uniform_64k,
- .write = write_82802ab,
+ .write = WRITE_82802AB,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -15946,7 +15946,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -15975,7 +15975,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -16004,7 +16004,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -16033,7 +16033,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -16062,7 +16062,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -16098,7 +16098,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd,
.unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
.voltage = {2700, 3600},
},
@@ -16132,7 +16132,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -16177,7 +16177,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -16216,7 +16216,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
.reg_bits =
@@ -16269,7 +16269,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd,
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -16298,7 +16298,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -16341,7 +16341,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
.unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -16375,7 +16375,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
.unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -16406,7 +16406,7 @@ const struct flashchip flashchips[] = {
},
},
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1700, 2000},
},
@@ -16437,7 +16437,7 @@ const struct flashchip flashchips[] = {
},
},
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1700, 2000},
},
@@ -16486,7 +16486,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: Configuration register */
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -16519,7 +16519,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: Configuration register */
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -16555,7 +16555,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd, /* TODO: improve */
.unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -16591,7 +16591,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_srwd, /* TODO: improve */
.unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -16626,7 +16626,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd,
.unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
.voltage = {2700, 3600},
},
@@ -16661,7 +16661,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd,
.unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
.voltage = {2700, 3600},
},
@@ -16710,7 +16710,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp3_srwd,
.unlock = spi_disable_blockprotect_bp3_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
.reg_bits =
@@ -16755,7 +16755,7 @@ const struct flashchip flashchips[] = {
},
},
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1700, 2000},
},
@@ -16783,7 +16783,7 @@ const struct flashchip flashchips[] = {
},
},
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1700, 2000},
},
@@ -16829,7 +16829,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
.unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -16866,7 +16866,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
.unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
- .write = spi_chip_write_256, /* Multi I/O supported, IGNORE for now */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported, IGNORE for now */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -16897,7 +16897,7 @@ const struct flashchip flashchips[] = {
},
},
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1700, 2000},
},
@@ -16928,7 +16928,7 @@ const struct flashchip flashchips[] = {
},
},
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1700, 2000},
},
@@ -16955,7 +16955,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -16982,7 +16982,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -17009,7 +17009,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
},
@@ -17035,7 +17035,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
},
@@ -17061,7 +17061,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -17088,7 +17088,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -17115,7 +17115,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -17142,7 +17142,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -17174,7 +17174,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -17206,7 +17206,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -17235,7 +17235,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -17264,7 +17264,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -17293,7 +17293,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read, /* Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
@@ -17334,7 +17334,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
.reg_bits =
@@ -17383,7 +17383,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
.reg_bits =
@@ -17433,7 +17433,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950},
.reg_bits =
@@ -17481,7 +17481,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950},
.reg_bits =
@@ -17531,7 +17531,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -17571,7 +17571,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */
},
@@ -17610,7 +17610,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */
},
@@ -17652,7 +17652,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
.reg_bits =
@@ -17707,7 +17707,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
.reg_bits =
@@ -17762,7 +17762,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
.reg_bits =
@@ -17817,7 +17817,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950},
},
@@ -17863,7 +17863,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1700, 1950},
},
@@ -17903,7 +17903,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -17943,7 +17943,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */
},
@@ -17981,7 +17981,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_tb_bpl,
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1700, 1950},
},
@@ -18021,7 +18021,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256, /* Multi I/O supported */
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -18060,7 +18060,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */
},
@@ -18099,7 +18099,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950}, /* Fast read (0x0B) and multi I/O supported */
},
@@ -18143,7 +18143,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -18186,7 +18186,7 @@ const struct flashchip flashchips[] = {
}
},
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950},
},
@@ -18226,7 +18226,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
.reg_bits =
@@ -18277,7 +18277,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
.reg_bits =
@@ -18328,7 +18328,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_bp2_tb_bpl,
.unlock = spi_disable_blockprotect_bp2_srwd,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -18368,7 +18368,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */
.reg_bits =
@@ -18418,7 +18418,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */
},
@@ -18458,7 +18458,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -18497,7 +18497,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */
},
@@ -18536,7 +18536,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950}, /* Fast read (0x0B) and multi I/O supported */
},
@@ -18568,7 +18568,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2300, 3600},
},
@@ -18600,7 +18600,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -18638,7 +18638,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -18670,7 +18670,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -18708,7 +18708,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -18740,7 +18740,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -18778,7 +18778,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -18810,7 +18810,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -18835,7 +18835,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec,
+ .write = WRITE_JEDEC,
.read = read_memmapped,
},
@@ -18858,7 +18858,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec,
+ .write = WRITE_JEDEC,
.read = read_memmapped,
},
@@ -18881,7 +18881,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec,
+ .write = WRITE_JEDEC,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -18905,7 +18905,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec,
+ .write = WRITE_JEDEC,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -18929,7 +18929,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec,
+ .write = WRITE_JEDEC,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -18959,7 +18959,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -18986,7 +18986,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -19016,7 +19016,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -19046,7 +19046,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -19073,7 +19073,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -19103,7 +19103,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -19130,7 +19130,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
},
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {2700, 3600},
},
@@ -19158,7 +19158,7 @@ const struct flashchip flashchips[] = {
}
},
.printlock = printlock_w39f010,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -19186,7 +19186,7 @@ const struct flashchip flashchips[] = {
}
},
.printlock = printlock_w39l010,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -19217,7 +19217,7 @@ const struct flashchip flashchips[] = {
}
},
.printlock = printlock_w39l020,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -19248,7 +19248,7 @@ const struct flashchip flashchips[] = {
}
},
.printlock = printlock_w39l040,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -19276,7 +19276,7 @@ const struct flashchip flashchips[] = {
}
},
.printlock = printlock_w39v040a,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -19304,7 +19304,7 @@ const struct flashchip flashchips[] = {
}
},
.printlock = printlock_w39v040b,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -19332,7 +19332,7 @@ const struct flashchip flashchips[] = {
}
},
.printlock = printlock_w39v040c,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -19364,7 +19364,7 @@ const struct flashchip flashchips[] = {
},
.printlock = printlock_w39v040fa,
.unlock = unlock_regspace2_uniform_64k,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -19393,7 +19393,7 @@ const struct flashchip flashchips[] = {
},
.printlock = printlock_w39v040fb,
.unlock = unlock_regspace2_uniform_64k,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program */
},
@@ -19421,7 +19421,7 @@ const struct flashchip flashchips[] = {
}
},
.printlock = printlock_w39v040fc,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program */
},
@@ -19449,7 +19449,7 @@ const struct flashchip flashchips[] = {
}
},
.printlock = printlock_w39v080a,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -19478,7 +19478,7 @@ const struct flashchip flashchips[] = {
},
.printlock = printlock_w39v080fa,
.unlock = unlock_regspace2_uniform_64k,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program */
},
@@ -19506,7 +19506,7 @@ const struct flashchip flashchips[] = {
}
},
.printlock = printlock_w39v080fa_dual,
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program */
},
@@ -19538,7 +19538,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -19562,7 +19562,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {4500, 5500},
},
@@ -19594,7 +19594,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -19626,7 +19626,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_chip_block_jedec,
}
},
- .write = write_jedec_1,
+ .write = WRITE_JEDEC1,
.read = read_memmapped,
.voltage = {3000, 3600},
},
@@ -19664,7 +19664,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -19702,7 +19702,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950},
},
@@ -19740,7 +19740,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain,
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
.reg_bits =
@@ -19790,7 +19790,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950},
},
@@ -19832,7 +19832,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
.reg_bits =
@@ -19881,7 +19881,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {1650, 1950},
},
@@ -19919,7 +19919,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -19957,7 +19957,7 @@ const struct flashchip flashchips[] = {
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -19978,7 +19978,7 @@ const struct flashchip flashchips[] = {
.probe = PROBE_SPI_SFDP,
.block_erasers = {}, /* set by probing function */
.unlock = spi_disable_blockprotect, /* is this safe? */
- .write = NULL, /* set by probing function */
+ .write = 0, /* set by probing function */
.read = spi_chip_read,
/* FIXME: some vendor extensions define this */
.voltage = {0},
@@ -20002,7 +20002,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_opaque,
}
},
- .write = write_opaque,
+ .write = WRITE_OPAQUE,
.read = read_opaque,
},
@@ -20017,7 +20017,7 @@ const struct flashchip flashchips[] = {
.tested = TEST_BAD_PREW,
.probe = PROBE_SPI_RDID4,
.probe_timing = TIMING_ZERO,
- .write = NULL,
+ .write = 0,
.read = NULL,
},
@@ -20032,7 +20032,7 @@ const struct flashchip flashchips[] = {
.tested = TEST_BAD_PREW,
.probe = PROBE_SPI_RDID,
.probe_timing = TIMING_ZERO,
- .write = NULL,
+ .write = 0,
.read = NULL,
},
@@ -20047,7 +20047,7 @@ const struct flashchip flashchips[] = {
.tested = TEST_BAD_PREW,
.probe = PROBE_SPI_RDID,
.probe_timing = TIMING_ZERO,
- .write = NULL,
+ .write = 0,
.read = NULL,
},
@@ -20062,7 +20062,7 @@ const struct flashchip flashchips[] = {
.tested = TEST_BAD_PREW,
.probe = PROBE_SPI_RDID,
.probe_timing = TIMING_ZERO,
- .write = NULL,
+ .write = 0,
.read = NULL,
},
@@ -20077,7 +20077,7 @@ const struct flashchip flashchips[] = {
.tested = TEST_BAD_PREW,
.probe = PROBE_SPI_RDID,
.probe_timing = TIMING_ZERO,
- .write = NULL,
+ .write = 0,
.read = NULL,
},
@@ -20092,7 +20092,7 @@ const struct flashchip flashchips[] = {
.tested = TEST_BAD_PREW,
.probe = PROBE_SPI_RDID,
.probe_timing = TIMING_ZERO,
- .write = NULL,
+ .write = 0,
.read = NULL,
},
@@ -20107,7 +20107,7 @@ const struct flashchip flashchips[] = {
.tested = TEST_BAD_PREW,
.probe = PROBE_SPI_RDID,
.probe_timing = TIMING_ZERO,
- .write = NULL,
+ .write = 0,
.read = NULL,
},
@@ -20122,7 +20122,7 @@ const struct flashchip flashchips[] = {
.tested = TEST_BAD_PREW,
.probe = PROBE_SPI_RDID,
.probe_timing = TIMING_ZERO,
- .write = NULL,
+ .write = 0,
.read = NULL,
},
@@ -20137,7 +20137,7 @@ const struct flashchip flashchips[] = {
.tested = TEST_BAD_PREW,
.probe = PROBE_SPI_RDID,
.probe_timing = TIMING_ZERO,
- .write = NULL,
+ .write = 0,
.read = NULL,
},
@@ -20151,7 +20151,7 @@ const struct flashchip flashchips[] = {
.page_size = 256,
.tested = TEST_BAD_PREW,
.probe = PROBE_SPI_RDID,
- .write = NULL,
+ .write = 0,
},
{
@@ -20164,7 +20164,7 @@ const struct flashchip flashchips[] = {
.page_size = 256,
.tested = TEST_BAD_PREW,
.probe = PROBE_SPI_REMS,
- .write = NULL,
+ .write = 0,
},
{0}
diff --git a/flashrom.c b/flashrom.c
index c8c7dd564..3ddc4b03c 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -729,6 +729,40 @@ static int init_default_layout(struct flashctx *flash)
return 0;
}
+/* special unit-test hook */
+write_func_t *g_test_write_injector;
+
+static write_func_t *lookup_write_func_ptr(const struct flashchip *chip)
+{
+ switch (chip->write) {
+ case WRITE_JEDEC: return &write_jedec;
+ case WRITE_JEDEC1: return &write_jedec_1;
+ case WRITE_OPAQUE: return &write_opaque;
+ case SPI_CHIP_WRITE1: return &spi_chip_write_1;
+ case SPI_CHIP_WRITE256: return &spi_chip_write_256;
+ case SPI_WRITE_AAI: return &spi_aai_write;
+ case SPI_WRITE_AT45DB: return &spi_write_at45db;
+ case WRITE_28SF040: return &write_28sf040;
+ case WRITE_82802AB: return &write_82802ab;
+ case WRITE_EN29LV640B: return &write_en29lv640b;
+ case EDI_CHIP_WRITE: return &edi_chip_write;
+ case TEST_WRITE_INJECTOR: return g_test_write_injector;
+ /* default: total function, 0 indicates no write function set.
+ * We explicitly do not want a default catch-all case in the switch
+ * to ensure unhandled enum's are compiler warnings.
+ */
+ case NO_WRITE_FUNC: return NULL;
+ };
+
+ return NULL;
+}
+
+static int write_flash(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len)
+{
+ write_func_t *write_func = lookup_write_func_ptr(flash->chip);
+ return write_func(flash, buf, start, len);
+}
+
typedef int (probe_func_t)(struct flashctx *flash);
static probe_func_t *lookup_probe_func_ptr(const struct flashchip *chip)
@@ -1161,7 +1195,7 @@ static int erase_block(struct flashctx *const flashctx,
if (!writecount++)
msg_cdbg("W");
/* Needs the partial write function signature. */
- if (flashctx->chip->write(flashctx, backup_contents + starthere,
+ if (write_flash(flashctx, backup_contents + starthere,
info->erase_start + starthere, lenhere))
goto _free_ret;
starthere += lenhere;
@@ -1265,7 +1299,7 @@ static int read_erase_write_block(struct flashctx *const flashctx,
if (!writecount++)
msg_cdbg("W");
/* Needs the partial write function signature. */
- if (flashctx->chip->write(flashctx, newcontents + starthere,
+ if (write_flash(flashctx, newcontents + starthere,
info->erase_start + starthere, lenhere))
goto _free_ret;
starthere += lenhere;
@@ -1555,7 +1589,7 @@ static int chip_safety_check(const struct flashctx *flash, int force,
return 1;
msg_cerr("Continuing anyway.\n");
}
- if (!chip->write) {
+ if (!lookup_write_func_ptr(chip)) {
msg_cerr("flashrom has no write function for this "
"flash chip.\n");
return 1;
diff --git a/include/flash.h b/include/flash.h
index 37f21ac50..b61b7eaef 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -238,6 +238,23 @@ enum probe_func {
PROBE_SPI_ST95,
};
+enum write_func {
+ NO_WRITE_FUNC = 0, /* 0 indicates no write function set. */
+ WRITE_JEDEC = 1,
+ WRITE_JEDEC1,
+ WRITE_OPAQUE,
+ SPI_CHIP_WRITE1,
+ SPI_CHIP_WRITE256,
+ SPI_WRITE_AAI,
+ SPI_WRITE_AT45DB,
+ WRITE_28SF040,
+ WRITE_82802AB,
+ WRITE_EN29LV640B,
+ EDI_CHIP_WRITE,
+ TEST_WRITE_INJECTOR, /* special case must come last. */
+};
+typedef int (write_func_t)(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
+
struct flashchip {
const char *vendor;
const char *name;
@@ -305,7 +322,7 @@ struct flashchip {
int (*printlock) (struct flashctx *flash);
int (*unlock) (struct flashctx *flash);
- int (*write) (struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
+ enum write_func write;
int (*read) (struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
struct voltage {
uint16_t min;
diff --git a/sfdp.c b/sfdp.c
index b5494177d..8fea4c9ef 100644
--- a/sfdp.c
+++ b/sfdp.c
@@ -179,11 +179,11 @@ static int sfdp_fill_flash(struct flashchip *chip, uint8_t *buf, uint16_t len)
if (tmp32 & (1 << 2)) {
msg_cdbg2("at least 64 B.\n");
chip->page_size = 64;
- chip->write = spi_chip_write_256;
+ chip->write = SPI_CHIP_WRITE256;
} else {
msg_cdbg2("1 B only.\n");
chip->page_size = 256;
- chip->write = spi_chip_write_1;
+ chip->write = SPI_CHIP_WRITE1;
}
if ((tmp32 & 0x3) == 0x1) {
diff --git a/tests/chip.c b/tests/chip.c
index 6f0317264..284b7e400 100644
--- a/tests/chip.c
+++ b/tests/chip.c
@@ -146,12 +146,14 @@ static void teardown(struct flashrom_layout **layout)
io_mock_register(NULL);
}
+extern write_func_t *g_test_write_injector;
+
static const struct flashchip chip_8MiB = {
.vendor = "aklm",
.total_size = MOCK_CHIP_SIZE / KiB,
.tested = TEST_OK_PREW,
.read = read_chip,
- .write = write_chip,
+ .write = TEST_WRITE_INJECTOR,
.unlock = unlock_chip,
.block_erasers =
{{
@@ -167,7 +169,7 @@ static const struct flashchip chip_W25Q128_V = {
.total_size = 16 * 1024,
.tested = TEST_OK_PREW,
.read = spi_chip_read,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.unlock = spi_disable_blockprotect,
.page_size = 256,
.block_erasers =
@@ -203,6 +205,7 @@ void erase_chip_test_success(void **state)
.fallback_open_state = &data,
};
+ g_test_write_injector = write_chip;
struct flashrom_flashctx flashctx = { 0 };
struct flashrom_layout *layout;
struct flashchip mock_chip = chip_8MiB;
@@ -261,6 +264,7 @@ void read_chip_test_success(void **state)
.fallback_open_state = &data,
};
+ g_test_write_injector = write_chip;
struct flashrom_flashctx flashctx = { 0 };
struct flashrom_layout *layout;
struct flashchip mock_chip = chip_8MiB;
@@ -332,6 +336,7 @@ void write_chip_test_success(void **state)
.fallback_open_state = &data,
};
+ g_test_write_injector = write_chip;
struct flashrom_flashctx flashctx = { 0 };
struct flashrom_layout *layout;
struct flashchip mock_chip = chip_8MiB;
@@ -429,6 +434,7 @@ void verify_chip_test_success(void **state)
.fallback_open_state = &data,
};
+ g_test_write_injector = write_chip;
struct flashrom_flashctx flashctx = { 0 };
struct flashrom_layout *layout;
struct flashchip mock_chip = chip_8MiB;
diff --git a/tests/chip_wp.c b/tests/chip_wp.c
index e4eff9907..3c9be4099 100644
--- a/tests/chip_wp.c
+++ b/tests/chip_wp.c
@@ -65,7 +65,7 @@ static const struct flashchip chip_W25Q128_V = {
.total_size = 16 * 1024,
.tested = TEST_OK_PREW,
.read = spi_chip_read,
- .write = spi_chip_write_256,
+ .write = SPI_CHIP_WRITE256,
.unlock = spi_disable_blockprotect,
.feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
.block_erasers =
diff --git a/tests/spi25.c b/tests/spi25.c
index 5cd84fb85..872959341 100644
--- a/tests/spi25.c
+++ b/tests/spi25.c
@@ -32,7 +32,7 @@ struct flashchip mock_chip = {
.page_size = 256,
.tested = TEST_BAD_PREW,
.probe = PROBE_SPI_RDID,
- .write = NULL,
+ .write = NO_WRITE_FUNC,
};
/*