diff options
Diffstat (limited to 'flashchips.c')
-rw-r--r-- | flashchips.c | 10992 |
1 files changed, 6454 insertions, 4538 deletions
diff --git a/flashchips.c b/flashchips.c index 4aaa8ac4a..26decb1ed 100644 --- a/flashchips.c +++ b/flashchips.c @@ -66,7 +66,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_SHORT_RESET | FEATURE_ADDR_2AA, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -77,14 +77,14 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 3}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */ }, @@ -98,7 +98,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_EITHER_RESET | FEATURE_ADDR_2AA, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -109,14 +109,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */ }, @@ -130,20 +130,20 @@ const struct flashchip flashchips[] = { .page_size = 16 * 1024, .feature_bits = FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {16 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -157,20 +157,20 @@ const struct flashchip flashchips[] = { .page_size = 16 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_OK_PRE, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {16 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -184,20 +184,20 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {2048 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -211,20 +211,20 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -238,20 +238,20 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -265,20 +265,20 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -292,20 +292,20 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -319,7 +319,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, /* unused */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -329,14 +329,14 @@ const struct flashchip flashchips[] = { {4 * 1024, 2}, {16 * 1024, 7}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* 3.0-3.6V for type -45R, others 2.7-3.6V */ }, @@ -350,7 +350,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, /* unused */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -360,14 +360,14 @@ const struct flashchip flashchips[] = { {4 * 1024, 2}, {8 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* 3.0-3.6V for type -45R, others 2.7-3.6V */ }, @@ -381,7 +381,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, /* unused */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -392,14 +392,14 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 3}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* 3.0-3.6V for type -55, others 2.7-3.6V */ }, @@ -413,7 +413,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, /* unused */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -424,14 +424,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* 3.0-3.6V for type -55, others 2.7-3.6V */ }, @@ -445,7 +445,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, /* unused */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -456,14 +456,14 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 7}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -477,7 +477,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, /* unused */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -488,14 +488,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -509,7 +509,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, /* unused */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -520,14 +520,14 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 15}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* 3.0-3.6V for type -70R, others 2.7-3.6V */ }, @@ -541,7 +541,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, /* unused */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -552,14 +552,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* 3.0-3.6V for type -70R, others 2.7-3.6V */ }, @@ -572,21 +572,21 @@ const struct flashchip flashchips[] = { .total_size = 512, .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, - .tested = TEST_OK_PRE, - .probe = probe_jedec, + .tested = TEST_OK_PREW, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* 3.0-3.6V for type -60R, others 2.7-3.6V*/ }, @@ -600,20 +600,20 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, /* datasheet specifies address as don't care */ .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* 3.0-3.6V for type -70R, others 2.7-3.6V */ }, @@ -627,25 +627,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 4 * 1024, 32 } }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { { 64 * 1024, 2 } }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 128 * 1024, 1 } }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -659,25 +659,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 4 * 1024, 512 } }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { { 64 * 1024, 32 } }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 2048 * 1024, 1 } }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -691,25 +691,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 4 * 1024, 64 } }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { { 64 * 1024, 4 } }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 256 * 1024, 1 } }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -724,31 +724,31 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, 0x48; write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 4 * 1024, 1024 } }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { { 64 * 1024, 64 } }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { { 64 * 1024, 64 } }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 4096 * 1024, 1 } }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 4096 * 1024, 1 } }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, + .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_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -762,25 +762,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 4 * 1024, 128 } }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { { 64 * 1024, 8 } }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 512 * 1024, 1 } }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -794,7 +794,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid4, + .probe = PROBE_SPI_RDID4, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -805,16 +805,16 @@ const struct flashchip flashchips[] = { {8 * 1024, 1}, {4 * 1024, 2}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp1_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -828,7 +828,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid4, + .probe = PROBE_SPI_RDID4, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -839,16 +839,16 @@ const struct flashchip flashchips[] = { {16 * 1024, 1}, {32 * 1024, 1}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp1_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -862,25 +862,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 4 * 1024, 256 } }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { { 64 * 1024, 16 } }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 1024 * 1024, 1 } }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -894,7 +894,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid4, + .probe = PROBE_SPI_RDID4, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -906,16 +906,16 @@ const struct flashchip flashchips[] = { {8 * 1024, 1}, {4 * 1024, 2}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp1_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -929,7 +929,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid4, + .probe = PROBE_SPI_RDID4, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -941,16 +941,16 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 1}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp1_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -964,7 +964,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid4, + .probe = PROBE_SPI_RDID4, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -976,19 +976,19 @@ const struct flashchip flashchips[] = { {8 * 1024, 1}, {4 * 1024, 2}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2048 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2048 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -1002,7 +1002,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PR, - .probe = probe_spi_rdid4, + .probe = PROBE_SPI_RDID4, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -1014,19 +1014,19 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 31}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2048 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2048 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -1040,7 +1040,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid4, + .probe = PROBE_SPI_RDID4, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -1052,16 +1052,16 @@ const struct flashchip flashchips[] = { {8 * 1024, 1}, {4 * 1024, 2}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp1_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -1075,7 +1075,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid4, + .probe = PROBE_SPI_RDID4, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -1087,16 +1087,16 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 3}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp1_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -1115,7 +1115,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PR, - .probe = probe_spi_rdid4, + .probe = PROBE_SPI_RDID4, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -1127,16 +1127,16 @@ const struct flashchip flashchips[] = { {8 * 1024, 1}, {4 * 1024, 2}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -1150,7 +1150,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid4, + .probe = PROBE_SPI_RDID4, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -1162,16 +1162,16 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 7}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -1185,25 +1185,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 4 * 1024, 16 } }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { { 64 * 1024, 1 } }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 64 * 1024, 1 } }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -1217,7 +1217,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PRE, - .probe = probe_spi_rdid4, + .probe = PROBE_SPI_RDID4, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -1229,16 +1229,16 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 15}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -1254,31 +1254,31 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, 0x48; write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 4 * 1024, 1024 } }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { { 64 * 1024, 64 } }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { { 64 * 1024, 64 } }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 4096 * 1024, 1 } }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 4096 * 1024, 1 } }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, + .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_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -1294,31 +1294,31 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, 0x48; write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 4 * 1024, 512 } }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { { 64 * 1024, 32 } }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { { 64 * 1024, 32 } }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 2048 * 1024, 1 } }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 2048 * 1024, 1 } }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, + .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_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -1335,31 +1335,31 @@ const struct flashchip flashchips[] = { /* QPI enable 0x35, disable 0xF5 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 4 * 1024, 2048 } }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { { 32 * 1024, 256 } }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { { 64 * 1024, 128 } }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 8192 * 1024, 1 } }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 8192 * 1024, 1 } }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enhance (sic!) */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enhance (sic!) */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -1373,7 +1373,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -1384,14 +1384,14 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 3}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -1405,7 +1405,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -1416,14 +1416,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -1437,20 +1437,20 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -1464,26 +1464,65 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_REGISTERMAP | FEATURE_EITHER_RESET, .tested = TEST_OK_PR, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* routine is wrapper to probe_jedec (pm49fl00x.c) */ .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .unlock = unlock_regspace2_uniform_64k, - .write = write_jedec_1, - .read = read_memmapped, + .unlock = UNLOCK_REGSPACE2_UNIFORM_64K, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, { .vendor = "Atmel", + .name = "AT25DF011", + .bustype = BUS_SPI, + .manufacture_id = ATMEL_ID, + .model_id = ATMEL_AT25DF011, + .total_size = 128, + .page_size = 256, + /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 32} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 4} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {32 * 1024, 4} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {128 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {128 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25DF, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT2X_GLOBAL_UNPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {1650, 3600}, + }, + + { + .vendor = "Atmel", .name = "AT25DF021", .bustype = BUS_SPI, .manufacture_id = ATMEL_ID, @@ -1493,31 +1532,31 @@ const struct flashchip flashchips[] = { /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 8} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_at25df, - .unlock = spi_disable_blockprotect_at2x_global_unprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25DF, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT2X_GLOBAL_UNPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, /* 2.3-3.6V & 2.7-3.6V models available */ }, @@ -1532,31 +1571,31 @@ const struct flashchip flashchips[] = { /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 8} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_at25df, - .unlock = spi_disable_blockprotect_at2x_global_unprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25DF, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT2X_GLOBAL_UNPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 3600}, }, @@ -1570,31 +1609,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_at25df, - .unlock = spi_disable_blockprotect_at2x_global_unprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25DF, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT2X_GLOBAL_UNPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, /* 2.3-3.6V & 2.7-3.6V models available */ }, @@ -1608,31 +1647,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_at25df, - .unlock = spi_disable_blockprotect_at2x_global_unprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25DF, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT2X_GLOBAL_UNPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1600, 2000}, /* Datasheet says range is 1.65-1.95 V */ }, @@ -1646,31 +1685,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_at25df_sec, - .unlock = spi_disable_blockprotect_at2x_global_unprotect_sec, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25DF_SEC, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT2X_GLOBAL_UNPROTECT_SEC, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -1684,31 +1723,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 64} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_at25df_sec, - .unlock = spi_disable_blockprotect_at2x_global_unprotect_sec, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25DF_SEC, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT2X_GLOBAL_UNPROTECT_SEC, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -1723,31 +1762,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 128} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_at25df, - .unlock = spi_disable_blockprotect_at2x_global_unprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25DF, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT2X_GLOBAL_UNPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -1762,31 +1801,31 @@ const struct flashchip flashchips[] = { /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 128} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_at25df_sec, - .unlock = spi_disable_blockprotect_at2x_global_unprotect_sec, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25DF_SEC, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT2X_GLOBAL_UNPROTECT_SEC, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -1800,31 +1839,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 256} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_at25df_sec, - .unlock = spi_disable_blockprotect_at2x_global_unprotect_sec, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25DF_SEC, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT2X_GLOBAL_UNPROTECT_SEC, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -1839,31 +1878,31 @@ const struct flashchip flashchips[] = { /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25DF_SEC, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT2X_GLOBAL_UNPROTECT_SEC, + .write = SPI_CHIP_WRITE256, /* Dual I/O (0xA2) supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B), dual I/O (0x3B) supported */ .voltage = {1650, 1950}, }, @@ -1878,31 +1917,31 @@ const struct flashchip flashchips[] = { /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 64} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25DF_SEC, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT2X_GLOBAL_UNPROTECT_SEC, + .write = SPI_CHIP_WRITE256, /* Dual I/O (0xA2) supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B), dual I/O (0x3B) supported */ .voltage = {1650, 1950}, }, @@ -1917,31 +1956,31 @@ const struct flashchip flashchips[] = { /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 64} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_at25df_sec, - .unlock = spi_disable_blockprotect_at2x_global_unprotect_sec, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25DF_SEC, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT2X_GLOBAL_UNPROTECT_SEC, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -1957,22 +1996,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_at25f, + .probe = PROBE_SPI_AT25F, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_62, + .block_erase = SPI_BLOCK_ERASE_62, } }, - .printlock = spi_prettyprint_status_register_at25f, - .unlock = spi_disable_blockprotect_at25f, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25F, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT25F, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -1986,22 +2025,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_at25f, + .probe = PROBE_SPI_AT25F, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_62, + .block_erase = SPI_BLOCK_ERASE_62, } }, - .printlock = spi_prettyprint_status_register_at25f, - .unlock = spi_disable_blockprotect_at25f, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25F, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT25F, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -2015,23 +2054,23 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_at25f, + .probe = PROBE_SPI_AT25F, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_62, + .block_erase = SPI_BLOCK_ERASE_62, } }, - .printlock = spi_prettyprint_status_register_at25f4096, + .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, - .read = spi_chip_read, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -2045,22 +2084,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_at25f, + .probe = PROBE_SPI_AT25F, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {32 * 1024, 2} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_62, + .block_erase = SPI_BLOCK_ERASE_62, } }, - .printlock = spi_prettyprint_status_register_at25f, - .unlock = spi_disable_blockprotect_at25f, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25F, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT25F, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -2074,23 +2113,23 @@ const struct flashchip flashchips[] = { .page_size = 128, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_at25f, + .probe = PROBE_SPI_AT25F, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {32 * 1024, 2} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_62, + .block_erase = SPI_BLOCK_ERASE_62, } }, - .printlock = spi_prettyprint_status_register_at25f512a, + .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, - .read = spi_chip_read, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT25F512A, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -2105,34 +2144,34 @@ const struct flashchip flashchips[] = { /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 16} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 2} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {32 * 1024, 2} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_62, + .block_erase = SPI_BLOCK_ERASE_62, } }, - .printlock = spi_prettyprint_status_register_at25f512b, - .unlock = spi_disable_blockprotect_at25f512b, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25F512B, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT25F512B, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -2146,34 +2185,34 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_at25fs010, - .unlock = spi_disable_blockprotect_at25fs010, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25FS010, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT25FS010, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -2187,31 +2226,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_at25fs040, - .unlock = spi_disable_blockprotect_at25fs040, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25FS040, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT25FS040, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -2225,31 +2264,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2500, 3600}, }, @@ -2263,31 +2302,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2300, 3600}, }, @@ -2301,31 +2340,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PR, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 512} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp4_srwd, - .unlock = spi_disable_blockprotect_bp4_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1700, 2000}, }, @@ -2339,31 +2378,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 64} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2048 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2048 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2500, 3600}, }, @@ -2377,31 +2416,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PR, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 128} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4096 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4096 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2500, 3600}, }, @@ -2414,34 +2453,44 @@ const struct flashchip flashchips[] = { .total_size = 16384, .page_size = 256, /* supports SFDP */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI | FEATURE_WRSR2, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 512} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1700, 2000}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -2454,25 +2503,25 @@ const struct flashchip flashchips[] = { .page_size = 256, /* does not support EWSR nor WREN and has no writable status register bits whatsoever */ .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {256, 2048} }, - .block_erase = spi_block_erase_81, + .block_erase = SPI_BLOCK_ERASE_81, }, { .eraseblocks = { {2 * 1024, 256} }, - .block_erase = spi_block_erase_50, + .block_erase = SPI_BLOCK_ERASE_50, }, { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, } }, - .printlock = spi_prettyprint_status_register_plain, + .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, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .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 */ }, @@ -2486,31 +2535,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_at26df081a, - .unlock = spi_disable_blockprotect_at2x_global_unprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT26DF081A, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT2X_GLOBAL_UNPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -2524,31 +2573,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 64} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_at25df, - .unlock = spi_disable_blockprotect_at2x_global_unprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT25DF, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT2X_GLOBAL_UNPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -2562,31 +2611,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 64} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_at26df081a, - .unlock = spi_disable_blockprotect_at2x_global_unprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT26DF081A, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT2X_GLOBAL_UNPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -2600,30 +2649,30 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = {.probe = NT, .read = NT, .erase = NT, .write = BAD}, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .write = NULL, /* Incompatible Page write */ - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .write = 0, /* Incompatible Page write */ + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -2637,17 +2686,17 @@ const struct flashchip flashchips[] = { .page_size = 128, .feature_bits = FEATURE_LONG_RESET, .tested = TEST_OK_PRE, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10000, /* 10mS, Enter=Exec */ .block_erasers = { { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec, /* FIXME */ - .read = read_memmapped, + .write = WRITE_JEDEC, /* FIXME */ + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -2661,17 +2710,17 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_LONG_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10000, /* 10ms */ .block_erasers = { { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec, - .read = read_memmapped, + .write = WRITE_JEDEC, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -2685,17 +2734,17 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_LONG_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10000, /* 10 ms */ .block_erasers = { { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec, - .read = read_memmapped, + .write = WRITE_JEDEC, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -2709,17 +2758,17 @@ const struct flashchip flashchips[] = { .page_size = 128, .feature_bits = FEATURE_LONG_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10000, /* 10mS, Enter=Exec */ .block_erasers = { { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec, - .read = read_memmapped, + .write = WRITE_JEDEC, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -2735,7 +2784,7 @@ const struct flashchip flashchips[] = { /* OTP: 128B total, 64B pre-programmed; read 0x77 (4 dummy bytes); write 0x9A (via buffer) */ .feature_bits = FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -2745,14 +2794,14 @@ const struct flashchip flashchips[] = { {248 * 1056, 1}, /* sector 0b: opcode 7Ch */ {256 * 1056, 63}, /* sectors 1 - 63: opcode 7Ch */ }, - .block_erase = spi_erase_at45cs_sector, + .block_erase = SPI_ERASE_AT45CS_SECTOR, } }, - .printlock = spi_prettyprint_status_register_plain, - .write = spi_write_at45db, - .read = spi_read_at45db, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, + .write = SPI_WRITE_AT45DB, + .read = SPI_READ_AT45DB, .voltage = {2700, 3600}, - .gran = write_gran_1056bytes, + .gran = WRITE_GRAN_1056BYTES, }, { @@ -2767,33 +2816,33 @@ const struct flashchip flashchips[] = { /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */ .feature_bits = FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_at45db, + .probe = PROBE_SPI_AT45DB, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {256, 512} }, - .block_erase = spi_erase_at45db_page, + .block_erase = SPI_ERASE_AT45DB_PAGE, }, { .eraseblocks = { {8 * 256, 512/8} }, - .block_erase = spi_erase_at45db_block, + .block_erase = SPI_ERASE_AT45DB_BLOCK, }, { .eraseblocks = { {8 * 256, 1}, {120 * 256, 1}, {128 * 256, 3}, }, - .block_erase = spi_erase_at45db_sector + .block_erase = SPI_ERASE_AT45DB_SECTOR }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_erase_at45db_chip, + .block_erase = SPI_ERASE_AT45DB_CHIP, } }, - .printlock = spi_prettyprint_status_register_at45db, - .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */ + .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, - .read = spi_read_at45db, /* Fast read (0x0B) supported */ + .write = SPI_WRITE_AT45DB, + .read = SPI_READ_AT45DB, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -2809,33 +2858,33 @@ const struct flashchip flashchips[] = { /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */ .feature_bits = FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_at45db, + .probe = PROBE_SPI_AT45DB, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {256, 1024} }, - .block_erase = spi_erase_at45db_page, + .block_erase = SPI_ERASE_AT45DB_PAGE, }, { .eraseblocks = { {8 * 256, 1024/8} }, - .block_erase = spi_erase_at45db_block, + .block_erase = SPI_ERASE_AT45DB_BLOCK, }, { .eraseblocks = { {8 * 256, 1}, {120 * 256, 1}, {128 * 256, 7}, }, - .block_erase = spi_erase_at45db_sector + .block_erase = SPI_ERASE_AT45DB_SECTOR }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_erase_at45db_chip, + .block_erase = SPI_ERASE_AT45DB_CHIP, } }, - .printlock = spi_prettyprint_status_register_at45db, - .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */ + .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, - .read = spi_read_at45db, /* Fast read (0x0B) supported */ + .write = SPI_WRITE_AT45DB, + .read = SPI_READ_AT45DB, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -2851,33 +2900,33 @@ const struct flashchip flashchips[] = { /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */ .feature_bits = FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_at45db, + .probe = PROBE_SPI_AT45DB, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {256, 2048} }, - .block_erase = spi_erase_at45db_page, + .block_erase = SPI_ERASE_AT45DB_PAGE, }, { .eraseblocks = { {8 * 256, 2048/8} }, - .block_erase = spi_erase_at45db_block, + .block_erase = SPI_ERASE_AT45DB_BLOCK, }, { .eraseblocks = { {8 * 256, 1}, {248 * 256, 1}, {256 * 256, 7}, }, - .block_erase = spi_erase_at45db_sector + .block_erase = SPI_ERASE_AT45DB_SECTOR }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_erase_at45db_chip, + .block_erase = SPI_ERASE_AT45DB_CHIP, } }, - .printlock = spi_prettyprint_status_register_at45db, - .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */ + .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, - .read = spi_read_at45db, /* Fast read (0x0B) supported */ + .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 */ }, @@ -2893,33 +2942,33 @@ const struct flashchip flashchips[] = { /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */ .feature_bits = FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_at45db, + .probe = PROBE_SPI_AT45DB, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {256, 4096} }, - .block_erase = spi_erase_at45db_page, + .block_erase = SPI_ERASE_AT45DB_PAGE, }, { .eraseblocks = { {8 * 256, 4096/8} }, - .block_erase = spi_erase_at45db_block, + .block_erase = SPI_ERASE_AT45DB_BLOCK, }, { .eraseblocks = { {8 * 256, 1}, {248 * 256, 1}, {256 * 256, 15}, }, - .block_erase = spi_erase_at45db_sector + .block_erase = SPI_ERASE_AT45DB_SECTOR }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_erase_at45db_chip, + .block_erase = SPI_ERASE_AT45DB_CHIP, } }, - .printlock = spi_prettyprint_status_register_at45db, - .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */ + .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, - .read = spi_read_at45db, /* Fast read (0x0B) supported */ + .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 */ }, @@ -2935,33 +2984,33 @@ const struct flashchip flashchips[] = { /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */ .feature_bits = FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_at45db, + .probe = PROBE_SPI_AT45DB, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {512, 4096} }, - .block_erase = spi_erase_at45db_page, + .block_erase = SPI_ERASE_AT45DB_PAGE, }, { .eraseblocks = { {8 * 512, 4096/8} }, - .block_erase = spi_erase_at45db_block, + .block_erase = SPI_ERASE_AT45DB_BLOCK, }, { .eraseblocks = { {8 * 512, 1}, {248 * 512, 1}, {256 * 512, 15}, }, - .block_erase = spi_erase_at45db_sector + .block_erase = SPI_ERASE_AT45DB_SECTOR }, { .eraseblocks = { {2048 * 1024, 1} }, - .block_erase = spi_erase_at45db_chip, + .block_erase = SPI_ERASE_AT45DB_CHIP, } }, - .printlock = spi_prettyprint_status_register_at45db, - .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */ + .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, - .read = spi_read_at45db, /* Fast read (0x0B) supported */ + .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 */ }, @@ -2977,16 +3026,16 @@ const struct flashchip flashchips[] = { /* OTP: 128B total, 64B pre-programmed; read 0x77 (4 dummy bytes); write 0x9A (via buffer) */ .feature_bits = FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {528, 8192} }, - .block_erase = spi_erase_at45db_page, + .block_erase = SPI_ERASE_AT45DB_PAGE, }, { .eraseblocks = { {8 * 528, 8192/8} }, - .block_erase = spi_erase_at45db_block, + .block_erase = SPI_ERASE_AT45DB_BLOCK, }, /* Although the datasheets describes sectors (which can be write protected) * there seems to be no erase functions for them. { @@ -2995,17 +3044,17 @@ const struct flashchip flashchips[] = { {120 * 528, 1}, {128 * 528, 63}, }, - .block_erase = spi_erase_at45db_sector + .block_erase = SPI_ERASE_AT45DB_SECTOR }, */ { .eraseblocks = { {4224 * 1024, 1} }, - .block_erase = spi_erase_at45db_chip, + .block_erase = SPI_ERASE_AT45DB_CHIP, } }, - .printlock = spi_prettyprint_status_register_at45db, /* Bit 0 is undefined, no lockdown */ - .write = spi_write_at45db, - .read = spi_read_at45db_e8, /* 3 address and 4 dummy bytes */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_AT45DB, /* Bit 0 is undefined, no lockdown */ + .write = SPI_WRITE_AT45DB, + .read = SPI_READ_AT45DB_E8, /* 3 address and 4 dummy bytes */ .voltage = {2700, 3600}, - .gran = write_gran_528bytes, + .gran = WRITE_GRAN_528BYTES, }, { @@ -3020,33 +3069,33 @@ const struct flashchip flashchips[] = { /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */ .feature_bits = FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_at45db, + .probe = PROBE_SPI_AT45DB, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {512, 8192} }, - .block_erase = spi_erase_at45db_page, + .block_erase = SPI_ERASE_AT45DB_PAGE, }, { .eraseblocks = { {8 * 512, 8192/8} }, - .block_erase = spi_erase_at45db_block, + .block_erase = SPI_ERASE_AT45DB_BLOCK, }, { .eraseblocks = { {8 * 512, 1}, {120 * 512, 1}, {128 * 512, 63}, }, - .block_erase = spi_erase_at45db_sector + .block_erase = SPI_ERASE_AT45DB_SECTOR }, { .eraseblocks = { {4096 * 1024, 1} }, - .block_erase = spi_erase_at45db_chip, + .block_erase = SPI_ERASE_AT45DB_CHIP, } }, - .printlock = spi_prettyprint_status_register_at45db, - .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */ + .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, - .read = spi_read_at45db, /* Fast read (0x0B) supported */ + .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 */ }, @@ -3062,33 +3111,33 @@ const struct flashchip flashchips[] = { /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */ .feature_bits = FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_at45db, + .probe = PROBE_SPI_AT45DB, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {512, 8192} }, - .block_erase = spi_erase_at45db_page, + .block_erase = SPI_ERASE_AT45DB_PAGE, }, { .eraseblocks = { {8 * 512, 8192/8} }, - .block_erase = spi_erase_at45db_block, + .block_erase = SPI_ERASE_AT45DB_BLOCK, }, { .eraseblocks = { {8 * 512, 1}, {120 * 512, 1}, {128 * 512, 63}, }, - .block_erase = spi_erase_at45db_sector + .block_erase = SPI_ERASE_AT45DB_SECTOR }, { .eraseblocks = { {4096 * 1024, 1} }, - .block_erase = spi_erase_at45db_chip, + .block_erase = SPI_ERASE_AT45DB_CHIP, } }, - .printlock = spi_prettyprint_status_register_at45db, /* has a 2nd status register */ - .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */ + .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, - .read = spi_read_at45db, /* Fast read (0x0B) supported */ + .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 */ }, @@ -3104,33 +3153,33 @@ const struct flashchip flashchips[] = { /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */ .feature_bits = FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_at45db, + .probe = PROBE_SPI_AT45DB, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {1024, 8192} }, - .block_erase = spi_erase_at45db_page, + .block_erase = SPI_ERASE_AT45DB_PAGE, }, { .eraseblocks = { {8 * 1024, 8192/8} }, - .block_erase = spi_erase_at45db_block, + .block_erase = SPI_ERASE_AT45DB_BLOCK, }, { .eraseblocks = { {8 * 1024, 1}, {248 * 1024, 1}, {256 * 1024, 31}, }, - .block_erase = spi_erase_at45db_sector + .block_erase = SPI_ERASE_AT45DB_SECTOR }, { .eraseblocks = { {8192 * 1024, 1} }, - .block_erase = spi_erase_at45db_chip, + .block_erase = SPI_ERASE_AT45DB_CHIP, } }, - .printlock = spi_prettyprint_status_register_at45db, - .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */ + .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, - .read = spi_read_at45db, /* Fast read (0x0B) supported */ + .write = SPI_WRITE_AT45DB, + .read = SPI_READ_AT45DB, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -3144,18 +3193,18 @@ const struct flashchip flashchips[] = { .page_size = 0, /* unused */ .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .printlock = printlock_at49f, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_AT49F, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -3169,17 +3218,17 @@ const struct flashchip flashchips[] = { .page_size = 64, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -3193,7 +3242,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -3204,14 +3253,14 @@ const struct flashchip flashchips[] = { {96 * 1024, 1}, {128 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -3225,7 +3274,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PR, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -3236,14 +3285,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -3257,13 +3306,13 @@ const struct flashchip flashchips[] = { .page_size = 0, /* unused */ .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PRE, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } /* Chip features an optional permanent write protection * of the first 8 kB. The erase function is the same as @@ -3272,9 +3321,9 @@ const struct flashchip flashchips[] = { * supported. */ }, - .printlock = printlock_at49f, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_AT49F, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -3288,13 +3337,13 @@ const struct flashchip flashchips[] = { .page_size = 0, /* unused */ .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } /* Chip features an optional permanent write protection * of the first 16 kB. The erase function is the same as @@ -3303,9 +3352,9 @@ const struct flashchip flashchips[] = { * supported. */ }, - .printlock = printlock_at49f, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_AT49F, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -3319,13 +3368,13 @@ const struct flashchip flashchips[] = { .page_size = 0, /* unused */ .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } /* Chip features an optional permanent write protection * of the first 16 kB. The erase function is the same as @@ -3334,9 +3383,9 @@ const struct flashchip flashchips[] = { * supported. */ }, - .printlock = printlock_at49f, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_AT49F, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -3351,13 +3400,13 @@ const struct flashchip flashchips[] = { .page_size = 0, /* unused */ .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } /* Chip features an optional permanent write protection * of the first 16 kB. The erase function is the same as @@ -3366,9 +3415,9 @@ const struct flashchip flashchips[] = { * supported. */ }, - .printlock = printlock_at49f, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_AT49F, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -3382,7 +3431,7 @@ const struct flashchip flashchips[] = { .page_size = 0, /* unused */ .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_UNTESTED, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -3393,18 +3442,18 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = NULL, /* TODO: Implement. */ + .block_erase = NO_BLOCK_ERASE_FUNC, /* TODO: Implement. */ }, { .eraseblocks = { {64 * 1024, 4}, }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, }, }, - .printlock = printlock_regspace2_block_eraser_0, - .unlock = unlock_regspace2_block_eraser_0, - .write = write_82802ab, - .read = read_memmapped, + .printlock = PRINTLOCK_REGSPACE2_BLOCK_ERASER_0, + .unlock = UNLOCK_REGSPACE2_BLOCK_ERASER_0, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -3418,7 +3467,7 @@ const struct flashchip flashchips[] = { .page_size = 0, /* unused */ .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_UNTESTED, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -3429,18 +3478,18 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, }, { .eraseblocks = { {64 * 1024, 8}, }, - .block_erase = NULL, /* TODO: Implement. */ + .block_erase = NO_BLOCK_ERASE_FUNC, /* TODO: Implement. */ }, }, - .printlock = printlock_regspace2_block_eraser_0, - .unlock = unlock_regspace2_block_eraser_0, - .write = write_82802ab, - .read = read_memmapped, + .printlock = PRINTLOCK_REGSPACE2_BLOCK_ERASER_0, + .unlock = UNLOCK_REGSPACE2_BLOCK_ERASER_0, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -3454,7 +3503,7 @@ const struct flashchip flashchips[] = { .page_size = 0, /* unused */ .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_UNTESTED, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -3465,56 +3514,132 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 7}, }, - .block_erase = NULL, /* TODO: Implement. */ + .block_erase = NO_BLOCK_ERASE_FUNC, /* TODO: Implement. */ }, { .eraseblocks = { {64 * 1024, 8}, }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, }, }, - .printlock = printlock_regspace2_block_eraser_0, - .unlock = unlock_regspace2_block_eraser_0, - .write = write_82802ab, - .read = read_memmapped, + .printlock = PRINTLOCK_REGSPACE2_BLOCK_ERASER_0, + .unlock = UNLOCK_REGSPACE2_BLOCK_ERASER_0, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, { - .vendor = "Boya Microelectronics", - .name = "BY25Q128AS", + .vendor = "Boya/BoHong Microelectronics", + .name = "B.25D16A", + .bustype = BUS_SPI, + .manufacture_id = BOYA_BOHONG_ID, + .model_id = BOYA_BOHONG_B_25D16A, + .total_size = 2048, + .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, + .tested = TEST_OK_PR, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 64} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 32} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {2 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {2 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {2700, 3600}, + }, + + { + .vendor = "Boya/BoHong Microelectronics", + .name = "B.25D80A", .bustype = BUS_SPI, - .manufacture_id = BOYA_ID, - .model_id = BOYA_BY25Q128AS, + .manufacture_id = BOYA_BOHONG_ID, + .model_id = BOYA_BOHONG_B__25D80A, + .total_size = 1024, + .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, + .tested = TEST_OK_PR, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 256} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 32} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 16} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {1 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {1 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {2700, 3600}, + }, + + { + .vendor = "Boya/BoHong Microelectronics", + .name = "B.25Q128AS", + .bustype = BUS_SPI, + .manufacture_id = BOYA_BOHONG_ID, + .model_id = BOYA_BOHONG_B_25Q128AS, .total_size = 16384, .page_size = 256, .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 512} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, - .unlock = spi_disable_blockprotect_at25fs040, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, + .unlock = SPI_DISABLE_BLOCKPROTECT_AT25FS040, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -3528,20 +3653,20 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PR, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -3555,17 +3680,17 @@ const struct flashchip flashchips[] = { .page_size = 0, /* unused */ .feature_bits = 0, .tested = {.probe = OK, .read = OK, .erase = BAD, .write = BAD}, - .probe = probe_jedec, /* FIXME! */ + .probe = PROBE_JEDEC, /* FIXME! */ .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = NULL, /* TODO */ + .block_erase = NO_BLOCK_ERASE_FUNC, /* TODO */ }, }, - .write = NULL, /* TODO */ - .read = read_memmapped, + .write = 0, /* TODO */ + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -3578,19 +3703,19 @@ const struct flashchip flashchips[] = { .feature_bits = FEATURE_ERASED_ZERO, .tested = TEST_OK_PREW, .spi_cmd_set = SPI_EDI, - .probe = edi_probe_kb9012, + .probe = PROBE_EDI_KB9012, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {128, 1024} }, - .block_erase = edi_chip_block_erase, + .block_erase = EDI_CHIP_BLOCK_ERASE, }, }, - .write = edi_chip_write, - .read = edi_chip_read, + .write = EDI_CHIP_WRITE, + .read = EDI_CHIP_READ, .voltage = {2700, 3600}, - .gran = write_gran_128bytes, + .gran = WRITE_GRAN_128BYTES, }, { @@ -3605,22 +3730,22 @@ const struct flashchip flashchips[] = { * supports read (0x53), fast read (0x5B), erase (0xD5) and program (0x52) instructions. */ .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect_bp2_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast Read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast Read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -3636,22 +3761,22 @@ const struct flashchip flashchips[] = { * supports read (0x53), fast read (0x5B), erase (0xD5) and program (0x52) instructions. */ .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect_bp2_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast Read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast Read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -3667,22 +3792,22 @@ const struct flashchip flashchips[] = { * supports read (0x53), fast read (0x5B), erase (0xD5) and program (0x52) instructions. */ .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect_bp2_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast Read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast Read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -3696,28 +3821,28 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EITHER, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_1, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE1, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -3731,28 +3856,28 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_bpl, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_BPL, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -3766,7 +3891,7 @@ const struct flashchip flashchips[] = { .page_size = 4096, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -3777,14 +3902,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -3798,7 +3923,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -3809,16 +3934,16 @@ const struct flashchip flashchips[] = { {16 * 1024, 1}, {32 * 1024, 1}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -3832,7 +3957,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -3843,16 +3968,16 @@ const struct flashchip flashchips[] = { {8 * 1024, 1}, {4 * 1024, 2}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -3866,7 +3991,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -3877,16 +4002,16 @@ const struct flashchip flashchips[] = { {16 * 1024, 1}, {32 * 1024, 3}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -3900,7 +4025,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -3911,16 +4036,16 @@ const struct flashchip flashchips[] = { {8 * 1024, 1}, {4 * 1024, 2}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -3934,7 +4059,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -3946,16 +4071,16 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 31}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -3969,7 +4094,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -3981,16 +4106,16 @@ const struct flashchip flashchips[] = { {8 * 1024, 1}, {4 * 1024, 2}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -4004,7 +4129,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -4016,16 +4141,16 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 3} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -4039,7 +4164,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -4051,16 +4176,16 @@ const struct flashchip flashchips[] = { {8 * 1024, 1}, {4 * 1024, 2}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -4075,7 +4200,7 @@ const struct flashchip flashchips[] = { /* OTP: 512B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -4087,16 +4212,16 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 63}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -4111,7 +4236,7 @@ const struct flashchip flashchips[] = { /* OTP: 512B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -4123,16 +4248,16 @@ const struct flashchip flashchips[] = { {8 * 1024, 1}, {4 * 1024, 2}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -4146,7 +4271,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -4158,16 +4283,16 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 7} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -4181,7 +4306,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -4193,16 +4318,16 @@ const struct flashchip flashchips[] = { {8 * 1024, 1}, {4 * 1024, 2}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -4217,7 +4342,7 @@ const struct flashchip flashchips[] = { /* OTP: 512B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -4229,16 +4354,16 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 127}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -4253,7 +4378,7 @@ const struct flashchip flashchips[] = { /* OTP: 512B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -4265,16 +4390,16 @@ const struct flashchip flashchips[] = { {8 * 1024, 1}, {4 * 1024, 2}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -4288,7 +4413,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -4300,16 +4425,16 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 15} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -4323,7 +4448,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -4335,16 +4460,16 @@ const struct flashchip flashchips[] = { {8 * 1024, 1}, {4 * 1024, 2}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -4358,31 +4483,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 16} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 2} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32 * 1024, 2} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -4395,32 +4520,32 @@ const struct flashchip flashchips[] = { .total_size = 128, .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, - .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -4434,28 +4559,28 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -4469,31 +4594,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -4507,28 +4632,28 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -4542,28 +4667,28 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -4577,28 +4702,28 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -4612,28 +4737,28 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -4647,23 +4772,23 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {32 * 1024, 2} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -4677,22 +4802,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -4706,22 +4831,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -4735,22 +4860,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -4765,22 +4890,22 @@ const struct flashchip flashchips[] = { /* OTP: 512B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -4794,22 +4919,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -4824,22 +4949,22 @@ const struct flashchip flashchips[] = { /* OTP: 512B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -4853,22 +4978,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -4883,28 +5008,28 @@ const struct flashchip flashchips[] = { /* OTP: 512B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, }, { @@ -4920,32 +5045,32 @@ const struct flashchip flashchips[] = { /* OTP: D16 512B/Q16 128B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { /* not supported by Q16 version */ .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -4960,28 +5085,28 @@ const struct flashchip flashchips[] = { /* OTP: 512B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -4996,28 +5121,28 @@ const struct flashchip flashchips[] = { /* OTP: 256B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -5032,28 +5157,28 @@ const struct flashchip flashchips[] = { /* OTP: 512B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -5068,28 +5193,28 @@ const struct flashchip flashchips[] = { /* OTP: 256B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -5105,30 +5230,37 @@ const struct flashchip flashchips[] = { /* OTP: 512B total; enter 0x3A */ /* QPI enable 0x38, disable 0xFF */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, - .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 16384 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 16384 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */ + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -5144,28 +5276,28 @@ const struct flashchip flashchips[] = { /* QPI enable 0x38, disable 0xFF */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 2048, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 2048, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -5182,28 +5314,76 @@ const struct flashchip flashchips[] = { /* QPI enable 0x38, disable 0xFF */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 4096, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 4096, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */ + }, + .decode_range = DECODE_RANGE_SPI25, + }, + + { + .vendor = "Eon", + .name = "EN25QH32B", + .bustype = BUS_SPI, + .manufacture_id = EON_ID_NOPREFIX, + .model_id = EON_EN25QH32, + .total_size = 4096, + .page_size = 256, + /* supports SFDP */ + /* OTP: 1536B total; enter 0x3A */ + /* QPI enable 0x38, disable 0xFF */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 1024} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 64} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {1024 * 4096, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {1024 * 4096, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -5220,28 +5400,76 @@ const struct flashchip flashchips[] = { /* QPI enable 0x38, disable 0xFF */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 8192 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 8192 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */ + }, + .decode_range = DECODE_RANGE_SPI25_64K_BLOCK, + }, + + { + .vendor = "Eon", + .name = "EN25QH64A", + .bustype = BUS_SPI, + .manufacture_id = EON_ID_NOPREFIX, + .model_id = EON_EN25QH64, + .total_size = 8192, + .page_size = 256, + /* supports SFDP */ + /* OTP: 512B total; enter 0x3A */ + /* QPI enable 0x38, disable 0xFF */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 2048} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 256} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { { 8192 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { { 8192 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -5256,28 +5484,28 @@ const struct flashchip flashchips[] = { /* OTP: 256B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 1950}, }, @@ -5292,31 +5520,31 @@ const struct flashchip flashchips[] = { /* OTP: 512B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, - }, { - .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {64 * 1024, 32} }, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {2048 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2048 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_en25s_wp, - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_EN25S_WP, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 1950}, }, @@ -5331,28 +5559,28 @@ const struct flashchip flashchips[] = { /* OTP: 256B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 1950}, }, @@ -5367,31 +5595,31 @@ const struct flashchip flashchips[] = { /* OTP: 512B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 128} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4096 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4096 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_en25s_wp, - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_EN25S_WP, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 1950}, }, @@ -5406,28 +5634,28 @@ const struct flashchip flashchips[] = { /* OTP: 256B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 1950}, }, @@ -5441,29 +5669,29 @@ const struct flashchip flashchips[] = { .page_size = 256, /* OTP: 512B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, - .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8192 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8192 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_en25s_wp, - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_EN25S_WP, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 1950}, }, @@ -5478,28 +5706,28 @@ const struct flashchip flashchips[] = { /* OTP: 256B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 1950}, }, @@ -5513,7 +5741,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -5524,14 +5752,14 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 3}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -5545,7 +5773,7 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -5556,14 +5784,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -5577,21 +5805,21 @@ const struct flashchip flashchips[] = { .page_size = 128, .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_OK_PRE, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {16 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -5605,7 +5833,7 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -5614,14 +5842,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 8}, {64 * 1024, 127}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -5635,7 +5863,7 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -5644,14 +5872,14 @@ const struct flashchip flashchips[] = { {64 * 1024, 127}, {8 * 1024, 8}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -5665,20 +5893,20 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -5692,20 +5920,20 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {128 * 1024, 128} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -5718,21 +5946,21 @@ const struct flashchip flashchips[] = { .total_size = 512, .page_size = 4 * 1024, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* 3.0-3.6V for type -45R and 55R, others 2.7-3.6V */ }, @@ -5746,7 +5974,7 @@ const struct flashchip flashchips[] = { .page_size = 8192, .feature_bits = FEATURE_ADDR_SHIFTED, .tested = TEST_OK_PREW, - .probe = probe_en29lv640b, + .probe = PROBE_EN29LV640B, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -5755,14 +5983,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 8}, {64 * 1024, 127}, }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_en29lv640b, - .read = read_memmapped, + .write = WRITE_EN29LV640B, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -5777,30 +6005,30 @@ const struct flashchip flashchips[] = { /* OTP: 256B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 16} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 2} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_tb_bpl, - .unlock = spi_disable_blockprotect_bp2_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_TB_BPL, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .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 */ }, @@ -5815,30 +6043,30 @@ const struct flashchip flashchips[] = { /* OTP: 256B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 2} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_tb_bpl, - .unlock = spi_disable_blockprotect_bp2_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_TB_BPL, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .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 */ }, @@ -5853,30 +6081,30 @@ const struct flashchip flashchips[] = { /* OTP: 256B total; enter 0x3A, (A version only:) read ID 0x4B */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 8} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 256, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 256, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_bp2_tb_bpl, - .unlock = spi_disable_blockprotect_bp2_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_TB_BPL, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .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 */ }, @@ -5891,30 +6119,30 @@ const struct flashchip flashchips[] = { /* OTP: 256B total; enter 0x3A, (A version only:) read ID 0x4B */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 512, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 512, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_bp2_tb_bpl, - .unlock = spi_disable_blockprotect_bp2_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_TB_BPL, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B), dual I/O (0x3B) supported */ .voltage = {2700, 3600}, }, @@ -5931,30 +6159,30 @@ const struct flashchip flashchips[] = { /* QPI enable 0x38, disable 0xFF */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -5971,30 +6199,30 @@ const struct flashchip flashchips[] = { /* QPI enable 0x38, disable 0xFF */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 64} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -6011,30 +6239,30 @@ const struct flashchip flashchips[] = { /* QPI enable 0x38, disable 0xFF */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 128} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -6048,7 +6276,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -6059,14 +6287,14 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 7}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = NULL, - .read = read_memmapped, + .write = 0, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -6080,7 +6308,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -6091,14 +6319,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = NULL, - .read = read_memmapped, + .write = 0, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -6113,7 +6341,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt .block_erasers = { @@ -6124,14 +6352,14 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 7}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */ }, @@ -6145,7 +6373,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_AAA | FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt .block_erasers = { @@ -6156,14 +6384,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */ }, @@ -6177,7 +6405,7 @@ const struct flashchip flashchips[] = { .page_size = 0, .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt .block_erasers = { @@ -6188,14 +6416,14 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 31}, }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {2048 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, /* Supports a fast mode too */ - .read = read_memmapped, + .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 */ }, @@ -6209,7 +6437,7 @@ const struct flashchip flashchips[] = { .page_size = 0, .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt .block_erasers = { @@ -6220,14 +6448,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {2048 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, /* Supports a fast mode too */ - .read = read_memmapped, + .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 */ }, @@ -6242,71 +6470,81 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 512} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, { .vendor = "GigaDevice", - .name = "GD25LQ128C/GD25LQ128D", + .name = "GD25LQ128C/GD25LQ128D/GD25LQ128E", .bustype = BUS_SPI, .manufacture_id = GIGADEVICE_ID, .model_id = GIGADEVICE_GD25LQ128CD, .total_size = 16384, .page_size = 256, /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, - .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_WRSR_EXT2, + .tested = TEST_OK_PREWB, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 512} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1695, 1950}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */ + .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */ + .cmp = {STATUS2, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -6320,31 +6558,31 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 64} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1695, 1950}, }, @@ -6359,31 +6597,31 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 128} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1695, 1950}, }, @@ -6398,31 +6636,31 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1695, 1950}, }, @@ -6435,34 +6673,44 @@ const struct flashchip flashchips[] = { .total_size = 8192, .page_size = 256, /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, - .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_WRSR_EXT2, + .tested = TEST_OK_PREWB, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 256} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1695, 1950}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */ + .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */ + .cmp = {STATUS2, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -6476,31 +6724,31 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1695, 1950}, }, @@ -6514,31 +6762,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 2} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -6552,35 +6800,45 @@ const struct flashchip flashchips[] = { .page_size = 256, /* OTP: 1536B total; read 0x48; write 0x42, erase 0x44 */ /* QPI: enable 0x38, disable 0xFF */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, - .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI | FEATURE_WRSR2, + .tested = TEST_OK_PREWB, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 512} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, /* 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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */ + .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */ + .cmp = {STATUS2, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -6594,31 +6852,31 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (B version only) */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 64} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -6632,79 +6890,88 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 8} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, { .vendor = "GigaDevice", - .name = "GD25Q256D", + .name = "GD25Q256D/GD25Q256E", .bustype = BUS_SPI, .manufacture_id = GIGADEVICE_ID, .model_id = GIGADEVICE_GD25Q256D, .total_size = 32768, .page_size = 256, - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN, - .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA | + FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3, + .tested = TEST_OK_PREWB, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_5c, + .block_erase = SPI_BLOCK_ERASE_5C, }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 6, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}}, + .tb = {STATUS1, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -6716,34 +6983,44 @@ const struct flashchip flashchips[] = { .total_size = 4096, .page_size = 256, /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, - .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_WRSR2, + .tested = TEST_OK_PREWB, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 128} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */ + .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */ + .cmp = {STATUS2, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -6755,32 +7032,32 @@ const struct flashchip flashchips[] = { .total_size = 512, .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, - .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -6794,28 +7071,28 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 16} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 2} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -6828,34 +7105,44 @@ const struct flashchip flashchips[] = { .total_size = 8192, .page_size = 256, /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, - .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_WRSR2, + .tested = TEST_OK_PREWB, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 256} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */ + .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */ + .cmp = {STATUS2, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -6869,31 +7156,31 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (B version only) */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -6908,31 +7195,31 @@ const struct flashchip flashchips[] = { /* OTP: 256B total; enter 0x3A */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -6948,31 +7235,31 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { { 32 * 1024, 64} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { { 64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2300, 3600}, }, @@ -6987,31 +7274,31 @@ const struct flashchip flashchips[] = { /* OTP: 1536B total; read 0x48, write 0x42, erase 0x44 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { { 32 * 1024, 8} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { { 64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2300, 3600}, }, @@ -7027,31 +7314,31 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { { 32 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { { 64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2300, 3600}, }, @@ -7066,31 +7353,31 @@ const struct flashchip flashchips[] = { /* OTP: 1536B total; read 0x48, write 0x42, erase 0x44 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { { 32 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { { 64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2300, 3600}, }, @@ -7106,31 +7393,31 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { { 32 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { { 64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, /* TODO: 2nd status reg (read with 0x35) */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2300, 3600}, }, @@ -7144,31 +7431,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp4_srwd, - .unlock = spi_disable_blockprotect_bp4_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 3600}, }, @@ -7182,7 +7469,7 @@ const struct flashchip flashchips[] = { .page_size = 256 * 1024, .feature_bits = FEATURE_EITHER_RESET, /* Some revisions may need FEATURE_ADDR_2AA */ .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -7193,14 +7480,14 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 3}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4750, 5250}, /* 4.75-5.25V for type -45, others 4.5-5.5V */ }, @@ -7214,7 +7501,7 @@ const struct flashchip flashchips[] = { .page_size = 256 * 1024, .feature_bits = FEATURE_EITHER_RESET, /* Some revisions may need FEATURE_ADDR_2AA */ .tested = TEST_OK_PRE, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -7225,14 +7512,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4750, 5250}, /* 4.75-5.25V for type -45, others 4.5-5.5V */ }, @@ -7246,25 +7533,66 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, { .vendor = "ISSI", + .name = "IS25LP016", + .bustype = BUS_SPI, + .manufacture_id = ISSI_ID_SPI, + .model_id = ISSI_IS25LP016, + .total_size = 2048, + .page_size = 256, + /* OTP: 1024B total; read 0x48; write 0x42 */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {4 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_D7, + }, { + .eraseblocks = { {32 * 1024, 64} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 32} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {2 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {2 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {2300, 3600}, + }, + + { + .vendor = "ISSI", .name = "IS25LP064", .bustype = BUS_SPI, .manufacture_id = ISSI_ID_SPI, @@ -7273,34 +7601,34 @@ const struct flashchip flashchips[] = { .page_size = 256, /* OTP: 1024B total; read 0x48; write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, - .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {32 * 1024, 256} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2300, 3600}, }, @@ -7315,33 +7643,33 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total; read 0x48; write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {32 * 1024, 512} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2300, 3600}, }, @@ -7355,48 +7683,172 @@ const struct flashchip flashchips[] = { .page_size = 256, /* supports SFDP */ /* OTP: 1024B total; read 0x68; write 0x62, erase 0x64, read ID 0x4B */ - /* FOUR_BYTE_ADDR: supports 4-bytes addressing mode */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA | FEATURE_4BA_ENTER_EAR7, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | + FEATURE_4BA | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_20, - /* could also use spi_block_erase_d7 */ + .block_erase = SPI_BLOCK_ERASE_20, + /* could also use SPI_BLOCK_ERASE_D7 */ }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_5c, + .block_erase = SPI_BLOCK_ERASE_5C, }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {2300, 3600}, + }, + + + { + .vendor = "ISSI", + .name = "IS25LQ016", + .bustype = BUS_SPI, + .manufacture_id = ISSI_ID_SPI, + .model_id = ISSI_IS25LQ016, + .total_size = 2048, + .page_size = 256, + /* OTP: 256B total; read 0x4b; write 0xb1 */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {4 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_D7, + }, { + .eraseblocks = { {64 * 1024, 32} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {2 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {2 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2300, 3600}, }, { .vendor = "ISSI", + .name = "IS25WP016", + .bustype = BUS_SPI, + .manufacture_id = ISSI_ID_SPI, + .model_id = ISSI_IS25WP016, + .total_size = 2048, + .page_size = 256, + /* OTP: 1024B total; read 0x48; write 0x42 */ + /* QPI enable 0x35, disable 0xF5 */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {4 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_D7, + }, { + .eraseblocks = { {32 * 1024, 64} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 32} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {2 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {2 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {1650, 1950}, + }, + + { + .vendor = "ISSI", + .name = "IS25WP020", + .bustype = BUS_SPI, + .manufacture_id = ISSI_ID_SPI, + .model_id = ISSI_IS25WP020, + .total_size = 256, + .page_size = 256, + /* OTP: 1024B total; read 0x48; write 0x42 */ + /* QPI enable 0x35, disable 0xF5 */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .tested = TEST_UNTESTED, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 64} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {4 * 1024, 64} }, + .block_erase = SPI_BLOCK_ERASE_D7, + }, { + .eraseblocks = { {32 * 1024, 8} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 4} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {256 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {256 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {1650, 1950}, + }, + + { + .vendor = "ISSI", .name = "IS25WP032", .bustype = BUS_SPI, .manufacture_id = ISSI_ID_SPI, @@ -7407,33 +7859,75 @@ const struct flashchip flashchips[] = { /* QPI enable 0x35, disable 0xF5 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {32 * 1024, 128} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {1650, 1950}, + }, + + { + .vendor = "ISSI", + .name = "IS25WP040", + .bustype = BUS_SPI, + .manufacture_id = ISSI_ID_SPI, + .model_id = ISSI_IS25WP040, + .total_size = 512, + .page_size = 256, + /* OTP: 1024B total; read 0x48; write 0x42 */ + /* QPI enable 0x35, disable 0xF5 */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .tested = TEST_UNTESTED, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {4 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_D7, + }, { + .eraseblocks = { {32 * 1024, 16} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 8} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {512 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {512 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 1950}, }, @@ -7449,33 +7943,75 @@ const struct flashchip flashchips[] = { /* QPI enable 0x35, disable 0xF5 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {32 * 1024, 256} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {1650, 1950}, + }, + + { + .vendor = "ISSI", + .name = "IS25WP080", + .bustype = BUS_SPI, + .manufacture_id = ISSI_ID_SPI, + .model_id = ISSI_IS25WP080, + .total_size = 1024, + .page_size = 256, + /* OTP: 1024B total; read 0x48; write 0x42 */ + /* QPI enable 0x35, disable 0xF5 */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 256} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {4 * 1024, 256} }, + .block_erase = SPI_BLOCK_ERASE_D7, + }, { + .eraseblocks = { {32 * 1024, 32} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 16} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 1950}, }, @@ -7491,33 +8027,33 @@ const struct flashchip flashchips[] = { /* QPI enable 0x35, disable 0xF5 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {32 * 1024, 512} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 1950}, }, @@ -7531,43 +8067,83 @@ const struct flashchip flashchips[] = { .page_size = 256, /* supports SFDP */ /* OTP: 1024B total; read 0x68; write 0x62, erase 0x64, read ID 0x4B */ - /* FOUR_BYTE_ADDR: supports 4-bytes addressing mode */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA | FEATURE_4BA_ENTER_EAR7, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | + FEATURE_4BA | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_20, - /* could also use spi_block_erase_d7 */ + .block_erase = SPI_BLOCK_ERASE_20, + /* could also use SPI_BLOCK_ERASE_D7 */ }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_5c, + .block_erase = SPI_BLOCK_ERASE_5C, }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {1650, 1950}, + }, + + { + .vendor = "ISSI", + .name = "IS25WQ040", + .bustype = BUS_SPI, + .manufacture_id = ISSI_ID_SPI, + .model_id = ISSI_IS25WQ040, + .total_size = 512, + .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {4 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_D7, + }, { + .eraseblocks = { {32 * 1024, 16} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 8} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {512 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {512 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 1950}, }, @@ -7581,7 +8157,7 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -7590,14 +8166,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 8}, {64 * 1024, 127}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -7611,20 +8187,20 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -7638,7 +8214,7 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -7647,14 +8223,14 @@ const struct flashchip flashchips[] = { {64 * 1024, 127}, {8 * 1024, 8}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -7668,20 +8244,20 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {128 * 1024, 128} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -7696,7 +8272,7 @@ const struct flashchip flashchips[] = { /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -7708,19 +8284,19 @@ const struct flashchip flashchips[] = { {8 * 1024, 8}, {64 * 1024, 31} // inaccessible }, - .block_erase = spi_block_erase_40, + .block_erase = SPI_BLOCK_ERASE_40, }, { */ .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_ep_srwd, - .unlock = spi_disable_blockprotect_bp2_ep_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* also fast read 0x0B */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_EP_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_EP_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* also fast read 0x0B */ .voltage = {2700, 3600}, }, @@ -7735,7 +8311,7 @@ const struct flashchip flashchips[] = { /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -7747,19 +8323,19 @@ const struct flashchip flashchips[] = { {64 * 1024, 31}, // inaccessible {8 * 1024, 8} }, - .block_erase = spi_block_erase_40, + .block_erase = SPI_BLOCK_ERASE_40, }, { */ .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_ep_srwd, - .unlock = spi_disable_blockprotect_bp2_ep_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* also fast read 0x0B */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_EP_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_EP_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* also fast read 0x0B */ .voltage = {2700, 3600}, }, @@ -7774,7 +8350,7 @@ const struct flashchip flashchips[] = { /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -7786,19 +8362,19 @@ const struct flashchip flashchips[] = { {8 * 1024, 8}, {64 * 1024, 63} // inaccessible }, - .block_erase = spi_block_erase_40, + .block_erase = SPI_BLOCK_ERASE_40, }, { */ .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_ep_srwd, - .unlock = spi_disable_blockprotect_bp2_ep_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* also fast read 0x0B */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_EP_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_EP_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* also fast read 0x0B */ .voltage = {2700, 3600}, }, @@ -7813,7 +8389,7 @@ const struct flashchip flashchips[] = { /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -7825,19 +8401,19 @@ const struct flashchip flashchips[] = { {64 * 1024, 63}, // inaccessible {8 * 1024, 8} }, - .block_erase = spi_block_erase_40, + .block_erase = SPI_BLOCK_ERASE_40, }, { */ .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_ep_srwd, - .unlock = spi_disable_blockprotect_bp2_ep_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* also fast read 0x0B */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_EP_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_EP_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* also fast read 0x0B */ .voltage = {2700, 3600}, }, @@ -7852,7 +8428,7 @@ const struct flashchip flashchips[] = { /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -7864,19 +8440,19 @@ const struct flashchip flashchips[] = { {8 * 1024, 8}, {64 * 1024, 127} // inaccessible }, - .block_erase = spi_block_erase_40, + .block_erase = SPI_BLOCK_ERASE_40, }, { */ .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_ep_srwd, - .unlock = spi_disable_blockprotect_bp2_ep_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* also fast read 0x0B */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_EP_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_EP_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* also fast read 0x0B */ .voltage = {2700, 3600}, }, @@ -7891,7 +8467,7 @@ const struct flashchip flashchips[] = { /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -7903,19 +8479,19 @@ const struct flashchip flashchips[] = { {64 * 1024, 127}, // inaccessible {8 * 1024, 8} }, - .block_erase = spi_block_erase_40, + .block_erase = SPI_BLOCK_ERASE_40, }, { */ .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_ep_srwd, - .unlock = spi_disable_blockprotect_bp2_ep_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* also fast read 0x0B */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_EP_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_EP_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* also fast read 0x0B */ .voltage = {2700, 3600}, }, @@ -7928,7 +8504,7 @@ const struct flashchip flashchips[] = { .total_size = 128, .page_size = 128 * 1024, /* 8k + 2x4k + 112k */ .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -7938,11 +8514,11 @@ const struct flashchip flashchips[] = { {4 * 1024, 2}, {112 * 1024, 1}, }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, }, }, - .write = write_82802ab, - .read = read_memmapped, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -7955,7 +8531,7 @@ const struct flashchip flashchips[] = { .total_size = 128, .page_size = 128 * 1024, /* 112k + 2x4k + 8k */ .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -7965,11 +8541,11 @@ const struct flashchip flashchips[] = { {4 * 1024, 2}, {8 * 1024, 1}, }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, }, }, - .write = write_82802ab, - .read = read_memmapped, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -7982,7 +8558,7 @@ const struct flashchip flashchips[] = { .total_size = 256, .page_size = 256 * 1024, .tested = TEST_OK_PRE, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -7993,11 +8569,11 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, }, }, - .write = write_82802ab, - .read = read_memmapped, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, }, { @@ -8009,7 +8585,7 @@ const struct flashchip flashchips[] = { .total_size = 512, .page_size = 128 * 1024, /* maximal block size */ .tested = TEST_UNTESTED, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -8020,11 +8596,11 @@ const struct flashchip flashchips[] = { {96 * 1024, 1}, {128 * 1024, 3}, }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, }, }, - .write = write_82802ab, - .read = read_memmapped, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, }, { @@ -8036,7 +8612,7 @@ const struct flashchip flashchips[] = { .total_size = 512, .page_size = 128 * 1024, /* maximal block size */ .tested = TEST_UNTESTED, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -8047,11 +8623,11 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, }, }, - .write = write_82802ab, - .read = read_memmapped, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, }, { @@ -8063,18 +8639,18 @@ const struct flashchip flashchips[] = { .total_size = 512, .page_size = 256, .tested = TEST_UNTESTED, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, }, }, - .unlock = unlock_28f004s5, - .write = write_82802ab, - .read = read_memmapped, + .unlock = UNLOCK_28F004S5, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, }, { @@ -8087,7 +8663,7 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* maximal block size */ .feature_bits = FEATURE_ADDR_SHIFTED, .tested = TEST_UNTESTED, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -8098,11 +8674,11 @@ const struct flashchip flashchips[] = { {96 * 1024, 1}, {128 * 1024, 3}, }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, }, }, - .write = write_82802ab, - .read = read_memmapped, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, }, { @@ -8115,7 +8691,7 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* maximal block size */ .feature_bits = FEATURE_ADDR_SHIFTED, .tested = TEST_UNTESTED, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -8126,16 +8702,16 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, }, }, - .write = write_82802ab, - .read = read_memmapped, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, }, { .vendor = "Intel", - .name = "82802AB", + .name = "AT82802AB", .bustype = BUS_FWH, .manufacture_id = INTEL_ID, .model_id = INTEL_82802AB, @@ -8143,18 +8719,18 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_OK_PREW, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_IGNORED, /* routine does not use probe_timing (82802ab.c) */ .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, }, }, - .unlock = unlock_regspace2_uniform_64k, - .write = write_82802ab, - .read = read_memmapped, + .unlock = UNLOCK_REGSPACE2_UNIFORM_64K, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -8168,18 +8744,18 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_OK_PR, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_IGNORED, /* routine does not use probe_timing (82802ab.c) */ .block_erasers = { { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, }, }, - .unlock = unlock_regspace2_uniform_64k, - .write = write_82802ab, - .read = read_memmapped, + .unlock = UNLOCK_REGSPACE2_UNIFORM_64K, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -8192,10 +8768,10 @@ const struct flashchip flashchips[] = { .total_size = 16384, .page_size = 256, .tested = {.probe = NT, .read = NT, .erase = NA, .write = NA}, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, - .write = NULL, /* MX23L12854 is a mask ROM, so it is read-only */ - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .write = 0, /* MX23L12854 is a mask ROM, so it is read-only */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {3000, 3600}, }, @@ -8208,10 +8784,10 @@ const struct flashchip flashchips[] = { .total_size = 2048, .page_size = 256, .tested = {.probe = NT, .read = NT, .erase = NA, .write = NA}, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, - .write = NULL, /* MX23L1654 is a mask ROM, so it is read-only */ - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .write = 0, /* MX23L1654 is a mask ROM, so it is read-only */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {3000, 3600}, }, @@ -8224,10 +8800,10 @@ const struct flashchip flashchips[] = { .total_size = 4096, .page_size = 256, .tested = {.probe = OK, .read = OK, .erase = NA, .write = NA}, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, - .write = NULL, /* MX23L3254 is a mask ROM, so it is read-only */ - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .write = 0, /* MX23L3254 is a mask ROM, so it is read-only */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {3000, 3600}, }, @@ -8240,10 +8816,10 @@ const struct flashchip flashchips[] = { .total_size = 8192, .page_size = 256, .tested = {.probe = OK, .read = OK, .erase = NA, .write = NA}, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, - .write = NULL, /* MX23L6454 is a mask ROM, so it is read-only */ - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .write = 0, /* MX23L6454 is a mask ROM, so it is read-only */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {3000, 3600}, }, @@ -8258,28 +8834,28 @@ const struct flashchip flashchips[] = { /* MX25L1006E supports SFDP */ .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 2} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_bp1_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported, MX25L1006E supports dual I/O */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported, MX25L1006E supports dual I/O */ .voltage = {2700, 3600}, }, @@ -8294,68 +8870,68 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; enter 0xB1, exit 0xC1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, { .vendor = "Macronix", - .name = "MX25L12835F/MX25L12845E/MX25L12865E", + .name = "MX25L12833F/MX25L12835F/MX25L12845E/MX25L12865E/MX25L12873F", .bustype = BUS_SPI, .manufacture_id = MACRONIX_ID, .model_id = MACRONIX_MX25L12805D, .total_size = 16384, .page_size = 256, - /* OTP: 512B total; enter 0xB1, exit 0xC1 */ + /* OTP: MX25L12833F has 1KB total, others have 512B total; enter 0xB1, exit 0xC1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 512} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, /* 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, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -8369,28 +8945,66 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit6: error flag */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, /* bit6: error flag */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ + .voltage = {2700, 3600}, + }, + + { + .vendor = "Macronix", + .name = "MX25V16066", /* was called KH25V16066 in rev v1.3 */ + .bustype = BUS_SPI, + .manufacture_id = MACRONIX_ID, + .model_id = MACRONIX_MX25L1605, + .total_size = 2048, /* 16M-bits */ + .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, + .tested = TEST_OK_PR, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 64} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 32} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {2 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {2 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + }, + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -8405,31 +9019,31 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; enter 0xB1, exit 0xC1 (MX25L1606E and MX25L1608E only) */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* MX25L1605A bp2 only */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported (MX25L1608E supports dual-I/O read) */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* MX25L1605A bp2 only */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported (MX25L1608E supports dual-I/O read) */ .voltage = {2700, 3600}, }, @@ -8443,28 +9057,28 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .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, - .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */ + .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_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B), dual I/O supported */ .voltage = {2700, 3600}, }, @@ -8479,28 +9093,28 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; enter 0xB1, exit 0xC1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -8515,28 +9129,28 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; enter 0xB1, exit 0xC1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -8550,31 +9164,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_bp1_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -8589,41 +9203,41 @@ const struct flashchip flashchips[] = { /* OTP: 512B total; enter 0xB1, exit 0xC1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_5c, + .block_erase = SPI_BLOCK_ERASE_5C, }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, /* 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, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -8637,28 +9251,28 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit6: error flag */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, /* bit6: error flag */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -8673,28 +9287,28 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; enter 0xB1, exit 0xC1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: continuously program mode */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) and dual I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6: continuously program mode */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and dual I/O supported */ .voltage = {2700, 3600}, }, @@ -8708,33 +9322,40 @@ const struct flashchip flashchips[] = { .page_size = 256, /* OTP: 64B total; enter 0xB1, exit 0xC1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, - .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .tested = TEST_OK_PREWB, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_bp3_srwd, - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) and dual I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and dual I/O supported */ .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .cmp = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like CMP */ + }, + .decode_range = DECODE_RANGE_SPI25_BIT_CMP, }, { @@ -8748,67 +9369,107 @@ const struct flashchip flashchips[] = { /* OTP: 256B total; enter 0xB1, exit 0xC1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, { .vendor = "Macronix", - .name = "MX25L3273E", + .name = "MX25L3233F/MX25L3273E", .bustype = BUS_SPI, .manufacture_id = MACRONIX_ID, .model_id = MACRONIX_MX25L3205, .total_size = 4096, .page_size = 256, - /* OTP: 64B total; enter 0xB1, exit 0xC1 */ + /* OTP: 512B total; enter 0xB1, exit 0xC1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 128} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_bp3_srwd, - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) and dual I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and dual I/O supported */ + .voltage = {2700, 3600}, /* 33F 2.65V..3.6V */ + }, + + { + .vendor = "Macronix", + .name = "MX25L3255E", + .bustype = BUS_SPI, + .manufacture_id = MACRONIX_ID, + .model_id = MACRONIX_MX25L3255E, + .total_size = 4096, + .page_size = 256, + /* OTP: 4K total; enter 0xB1, exit 0xC1 */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 1024} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 64} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {4 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {4 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + }, + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + /* Fast read (0x0B), 2x and 4x I/O supported */ + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -8822,31 +9483,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -8861,31 +9522,31 @@ const struct flashchip flashchips[] = { /* MX25L512E supports SFDP */ .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 16} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_bp1_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported, MX25L512E supports dual I/O */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .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) */ }, @@ -8899,31 +9560,31 @@ const struct flashchip flashchips[] = { .page_size = 32, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 16} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_bp1_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -8938,29 +9599,35 @@ const struct flashchip flashchips[] = { /* Has an additional 512B EEPROM sector */ .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: error flag */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6: error flag */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -8974,29 +9641,36 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; enter 0xB1, exit 0xC1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: continuously program mode */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0xBB) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6: continuously program mode */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B), dual I/O read (0xBB) supported */ .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .cmp = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like CMP */ + }, + .decode_range = DECODE_RANGE_SPI25_BIT_CMP, }, { @@ -9010,38 +9684,45 @@ const struct flashchip flashchips[] = { /* MX25L6406E supports SFDP */ /* OTP: 06E 64B total; enter 0xB1, exit 0xC1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, - .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .tested = TEST_OK_PREWB, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B), dual I/O read supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B), dual I/O read supported */ .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .cmp = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like CMP */ + }, + .decode_range = DECODE_RANGE_SPI25_BIT_CMP, }, { .vendor = "Macronix", - .name = "MX25L6436E/MX25L6445E/MX25L6465E/MX25L6473E/MX25L6473F", + .name = "MX25L6436E/MX25L6445E/MX25L6465E", .bustype = BUS_SPI, .manufacture_id = MACRONIX_ID, .model_id = MACRONIX_MX25L6405, @@ -9049,34 +9730,136 @@ const struct flashchip flashchips[] = { .page_size = 256, /* supports SFDP */ /* OTP: 512B total; enter 0xB1, exit 0xC1 */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_SCUR, + .tested = TEST_OK_PREWB, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 2048} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 256} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {8 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {8 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ + .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}}, + .wps = {SECURITY, 7, OTP}, /* This bit is set by WPSEL command */ + }, + .decode_range = DECODE_RANGE_SPI25_2X_BLOCK, + }, + + { + .vendor = "Macronix", + .name = "MX25L6473E", + .bustype = BUS_SPI, + .manufacture_id = MACRONIX_ID, + .model_id = MACRONIX_MX25L6405, + .total_size = 8192, + .page_size = 256, + /* supports SFDP */ + /* OTP: 512B total; enter 0xB1, exit 0xC1 */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_WRSR_EXT2 | FEATURE_SCUR, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 2048} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 256} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {8 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {8 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ + .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}}, + .tb = {CONFIG, 3, OTP}, + .wps = {SECURITY, 7, OTP}, /* This bit is set by WPSEL command */ + }, + .decode_range = DECODE_RANGE_SPI25, + }, + + { + .vendor = "Macronix", + .name = "MX25L6473F", + .bustype = BUS_SPI, + .manufacture_id = MACRONIX_ID, + .model_id = MACRONIX_MX25L6405, + .total_size = 8192, + .page_size = 256, + /* supports SFDP */ + /* OTP: 512B total; enter 0xB1, exit 0xC1 */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_WRSR_EXT2, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 256} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}}, + .tb = {CONFIG, 3, OTP}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -9090,30 +9873,30 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total; enter 0xB1, exit 0xC1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, - }, { - .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 256} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -9129,31 +9912,31 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; enter 0xB1, exit 0xC1 (MX25L8006E, MX25L8008E only) */ .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, /* 2.35-3.6V for MX25V8005 */ }, @@ -9168,31 +9951,31 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total; enter 0xB1, exit 0xC1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, - }, { - .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 128} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 64} }, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit 6 is quad enable */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit 6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1650, 3600}, }, @@ -9207,36 +9990,142 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total; enter 0xB1, exit 0xC1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, - }, { - .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 256} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1650, 3600}, }, { .vendor = "Macronix", + .name = "MX25V4035F", + .bustype = BUS_SPI, + .manufacture_id = MACRONIX_ID, + .model_id = MACRONIX_MX25V4035F, + .total_size = 512, + .page_size = 256, + /* OTP: 8KiB total; enter 0xB1, exit 0xC1 */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI | FEATURE_SCUR, + .tested = TEST_UNTESTED, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { { 4 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 16} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 8} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {512 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ + .voltage = {2300, 3600}, + }, + { + .vendor = "Macronix", + .name = "MX25V8035F", + .bustype = BUS_SPI, + .manufacture_id = MACRONIX_ID, + .model_id = MACRONIX_MX25V8035F, + .total_size = 1024, + .page_size = 256, + /* OTP: 8KiB total; enter 0xB1, exit 0xC1 */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI | FEATURE_SCUR, + .tested = TEST_UNTESTED, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { { 4 * 1024, 256} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 32} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 16} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {1 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ + .voltage = {2300, 3600}, + }, + { + .vendor = "Macronix", + .name = "MX25V1635F", + .bustype = BUS_SPI, + .manufacture_id = MACRONIX_ID, + .model_id = MACRONIX_MX25V1635F, + .total_size = 2048, + .page_size = 256, + /* OTP: 8KiB total; enter 0xB1, exit 0xC1 */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI | FEATURE_SCUR, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { { 4 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 64} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 32} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {2 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ + .voltage = {2300, 3600}, + }, + + { + .vendor = "Macronix", .name = "MX25U12835F", .bustype = BUS_SPI, .manufacture_id = MACRONIX_ID, @@ -9246,32 +10135,32 @@ const struct flashchip flashchips[] = { /* OTP: 512B total; enter 0xB1, exit 0xC1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 512} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, /* 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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1650, 2000}, }, @@ -9287,38 +10176,38 @@ const struct flashchip flashchips[] = { /* QPI enable 0x35, disable 0xF5 (0xFF et al. work too) */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_OK_PR, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 64} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, /* 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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1650, 2000}, }, { .vendor = "Macronix", - .name = "MX25U25635F", + .name = "MX25U25635F/MX25U25643G", .bustype = BUS_SPI, .manufacture_id = MACRONIX_ID, .model_id = MACRONIX_MX25U25635F, @@ -9326,42 +10215,42 @@ const struct flashchip flashchips[] = { .page_size = 256, /* OTP: 512B total; enter 0xB1, exit 0xC1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI | FEATURE_4BA, - .tested = TEST_OK_PR, - .probe = probe_spi_rdid, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_5c, + .block_erase = SPI_BLOCK_ERASE_5C, }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, /* 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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1650, 2000}, }, @@ -9378,32 +10267,32 @@ const struct flashchip flashchips[] = { /* QPI enable 0x35, disable 0xF5 (0xFF et al. work too) */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 128} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, /* 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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1650, 2000}, }, @@ -9418,41 +10307,41 @@ const struct flashchip flashchips[] = { /* OTP: 512B factory programmed and 512B customer programmed; enter 0xB1, exit 0xC1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI | FEATURE_4BA, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 16384} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 16384} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 2048} }, - .block_erase = spi_block_erase_5c, + .block_erase = SPI_BLOCK_ERASE_5C, }, { .eraseblocks = { {32 * 1024, 2048} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 1024} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 1024} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {64 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {64 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, /* 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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1650, 2000}, }, @@ -9469,32 +10358,32 @@ const struct flashchip flashchips[] = { /* QPI enable 0x35, disable 0xF5 (0xFF et al. work too) */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 256} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, /* 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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1650, 2000}, }, @@ -9509,32 +10398,32 @@ const struct flashchip flashchips[] = { /* OTP: 512B total; enter 0xB1, exit 0xC1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, /* 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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1650, 2000}, }, @@ -9548,7 +10437,7 @@ const struct flashchip flashchips[] = { .page_size = 32 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -9560,14 +10449,14 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -9581,7 +10470,7 @@ const struct flashchip flashchips[] = { .page_size = 32 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -9593,14 +10482,14 @@ const struct flashchip flashchips[] = { {4 * 1024, 2}, {8 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -9614,7 +10503,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -9625,14 +10514,14 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 3}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -9646,7 +10535,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -9657,14 +10546,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -9678,7 +10567,7 @@ const struct flashchip flashchips[] = { .page_size = 0, /* unused */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -9689,14 +10578,14 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 3}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -9710,7 +10599,7 @@ const struct flashchip flashchips[] = { .page_size = 0, /* unused */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -9721,14 +10610,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -9742,20 +10631,20 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -9769,20 +10658,20 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {128 * 1024, 128} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -9796,7 +10685,7 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -9805,14 +10694,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 8}, {64 * 1024, 63}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -9826,20 +10715,20 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -9853,7 +10742,7 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -9862,14 +10751,14 @@ const struct flashchip flashchips[] = { {64 * 1024, 63}, {8 * 1024, 8}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -9883,7 +10772,7 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -9892,14 +10781,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 8}, {64 * 1024, 127}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -9913,20 +10802,20 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -9940,7 +10829,7 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -9949,14 +10838,14 @@ const struct flashchip flashchips[] = { {64 * 1024, 127}, {8 * 1024, 8}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -9970,20 +10859,20 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -9998,47 +10887,136 @@ const struct flashchip flashchips[] = { /* OTP: 512B total; enter 0xB1, exit 0xC1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 16384} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 16384} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 2048} }, - .block_erase = spi_block_erase_5c, + .block_erase = SPI_BLOCK_ERASE_5C, }, { .eraseblocks = { {32 * 1024, 2048} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 1024} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 1024} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {64 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {64 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, /* 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, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ + .voltage = {2700, 3600}, + }, + + { + .vendor = "Macronix", + .name = "MX66L1G45G", + .bustype = BUS_SPI, + .manufacture_id = MACRONIX_ID, + .model_id = MACRONIX_MX66L1G45G, + .total_size = 131072, + .page_size = 256, + /* OTP: 512B total; enter 0xB1, exit 0xC1 */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 32768} }, + .block_erase = SPI_BLOCK_ERASE_21, + }, { + .eraseblocks = { {4 * 1024, 32768} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 4096} }, + .block_erase = SPI_BLOCK_ERASE_5C, + }, { + .eraseblocks = { {32 * 1024, 4096} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 2048} }, + .block_erase = SPI_BLOCK_ERASE_DC, + }, { + .eraseblocks = { {64 * 1024, 2048} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {128 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {128 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + /* 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_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ + .voltage = {2700, 3600}, + }, + + { + .vendor = "Macronix", + .name = "MX77L25650F", + .bustype = BUS_SPI, + .manufacture_id = MACRONIX_ID, + .model_id = MACRONIX_MX77L25650F, + .total_size = 32768, + .page_size = 256, + /* OTP: 512B total; enter 0xB1, exit 0xC1 */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 8192} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 1024} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {32 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {32 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + /* TODO: block WP, security register, configuration register */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, /* The ST M25P05 is a bit of a problem. It has the same ID as the * ST M25P05-A in RES mode, but supports only 128 byte writes instead - * of 256 byte writes. We rely heavily on the fact that probe_spi_res1 + * of 256 byte writes. We rely heavily on the fact that PROBE_SPI_RES1 * only is successful if RDID does not work. */ { @@ -10051,22 +11029,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_res1, + .probe = PROBE_SPI_RES1, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {32 * 1024, 2} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_1, /* 128 */ - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* TODO: check */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE1, /* 128 */ + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -10080,22 +11058,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {32 * 1024, 2} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* TODO: check */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -10110,22 +11088,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_res1, + .probe = PROBE_SPI_RES1, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_1, /* 128 */ - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* TODO: check */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE1, /* 128 */ + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -10139,22 +11117,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* TODO: check */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -10168,22 +11146,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {256 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* TODO: check */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -10197,22 +11175,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* TODO: check */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -10226,22 +11204,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp1_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -10255,22 +11233,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_res1, + .probe = PROBE_SPI_RES1, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp1_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -10284,22 +11262,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* TODO: check */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -10313,22 +11291,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* TODO: check */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -10342,22 +11320,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_res1, + .probe = PROBE_SPI_RES1, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* TODO: check */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, }, { @@ -10370,22 +11348,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* TODO: check */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -10399,22 +11377,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* TODO: check */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -10428,25 +11406,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 2} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -10460,25 +11438,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -10492,25 +11470,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -10524,25 +11502,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -10556,25 +11534,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -10589,25 +11567,25 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B; write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 4 * 1024, 512 } }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, + .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_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2300, 3600}, }, @@ -10622,25 +11600,25 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B; write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PRE, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 4 * 1024, 1024 } }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, + .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_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -10655,25 +11633,25 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B; write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 4 * 1024, 2048 } }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, + .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_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -10688,25 +11666,25 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 4 * 1024, 256 } }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, + .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_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -10719,22 +11697,22 @@ const struct flashchip flashchips[] = { .total_size = 128, .page_size = 256, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {256, 512} }, - .block_erase = spi_block_erase_db, + .block_erase = SPI_BLOCK_ERASE_DB, }, { .eraseblocks = { {64 * 1024, 2} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, } }, - .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) */ - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_DEFAULT_WELWIP, + .unlock = NO_BLOCKPROTECT_FUNC, /* #WP pin write-protects lower 64kB. */ + .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}, }, @@ -10747,22 +11725,22 @@ const struct flashchip flashchips[] = { .total_size = 2048, .page_size = 256, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {256, 8192} }, - .block_erase = spi_block_erase_db, + .block_erase = SPI_BLOCK_ERASE_DB, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, } }, - .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) */ - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_DEFAULT_WELWIP, + .unlock = NO_BLOCKPROTECT_FUNC, /* #WP pin write-protects lower 64kB. */ + .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}, }, @@ -10775,22 +11753,22 @@ const struct flashchip flashchips[] = { .total_size = 256, .page_size = 256, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {256, 1024} }, - .block_erase = spi_block_erase_db, + .block_erase = SPI_BLOCK_ERASE_DB, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, } }, - .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) */ - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_DEFAULT_WELWIP, + .unlock = NO_BLOCKPROTECT_FUNC, /* #WP pin write-protects lower 64kB. */ + .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}, }, @@ -10803,22 +11781,22 @@ const struct flashchip flashchips[] = { .total_size = 512, .page_size = 256, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {256, 2048} }, - .block_erase = spi_block_erase_db, + .block_erase = SPI_BLOCK_ERASE_DB, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, } }, - .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) */ - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_DEFAULT_WELWIP, + .unlock = NO_BLOCKPROTECT_FUNC, /* #WP pin write-protects lower 64kB. */ + .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}, }, @@ -10831,22 +11809,22 @@ const struct flashchip flashchips[] = { .total_size = 1024, .page_size = 256, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {256, 4096} }, - .block_erase = spi_block_erase_db, + .block_erase = SPI_BLOCK_ERASE_DB, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, } }, - .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) */ - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_DEFAULT_WELWIP, + .unlock = NO_BLOCKPROTECT_FUNC, /* #WP pin write-protects lower 64kB. */ + .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}, }, @@ -10862,31 +11840,31 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 32768} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 32768} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 2048} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 2048} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32768 * 1024, 4} }, - .block_erase = spi_block_erase_c4, + .block_erase = SPI_BLOCK_ERASE_C4, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1700, 2000}, }, @@ -10902,31 +11880,31 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 32768} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 32768} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 2048} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 2048} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32768 * 1024, 4} }, - .block_erase = spi_block_erase_c4, + .block_erase = SPI_BLOCK_ERASE_C4, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -10942,28 +11920,28 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 64} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1700, 2000}, }, @@ -10979,26 +11957,37 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1700, 2000}, + .reg_bits = + { + /* + * There is also a volatile lock register per 64KiB sector, which is not + * mutually exclusive with BP-based protection. + */ + .srp = {STATUS1, 7, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -11013,26 +12002,37 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, + .reg_bits = + { + /* + * There is also a volatile lock register per 64KiB sector, which is not + * mutually exclusive with BP-based protection. + */ + .srp = {STATUS1, 7, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -11047,26 +12047,37 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048 } }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1700, 2000}, + .reg_bits = + { + /* + * There is also a volatile lock register per 64KiB sector, which is not + * mutually exclusive with BP-based protection. + */ + .srp = {STATUS1, 7, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}}, + .tb = {STATUS1, 5, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -11081,26 +12092,37 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048 } }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, + .reg_bits = + { + /* + * There is also a volatile lock register per 64KiB sector, which is not + * mutually exclusive with BP-based protection. + */ + .srp = {STATUS1, 7, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}}, + .tb = {STATUS1, 5, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -11115,25 +12137,25 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096 } }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16384 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1700, 2000}, }, @@ -11149,25 +12171,25 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096 } }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16384 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -11183,31 +12205,31 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32768 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1700, 2000}, }, @@ -11223,31 +12245,31 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32768 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -11263,31 +12285,31 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 16384} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 16384} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 1024} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 1024} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32768 * 1024, 2} }, - .block_erase = spi_block_erase_c4, + .block_erase = SPI_BLOCK_ERASE_C4, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1700, 2000}, }, @@ -11303,31 +12325,31 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 16384} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 16384} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 1024} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 1024} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32768 * 1024, 2} }, - .block_erase = spi_block_erase_c4, + .block_erase = SPI_BLOCK_ERASE_C4, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -11343,37 +12365,37 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 32768} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 32768} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 4096} }, - .block_erase = spi_block_erase_5c, + .block_erase = SPI_BLOCK_ERASE_5C, }, { .eraseblocks = { {32 * 1024, 4096} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 2048} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 2048} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {65536 * 1024, 2} }, - .block_erase = spi_block_erase_c4, + .block_erase = SPI_BLOCK_ERASE_C4, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -11389,37 +12411,37 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 32768} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 32768} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 4096} }, - .block_erase = spi_block_erase_5c, + .block_erase = SPI_BLOCK_ERASE_5C, }, { .eraseblocks = { {32 * 1024, 4096} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 2048} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 2048} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {65536 * 1024, 2} }, - .block_erase = spi_block_erase_c4, + .block_erase = SPI_BLOCK_ERASE_C4, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1700, 2000}, }, @@ -11435,37 +12457,37 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 65536} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 65536} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 8192} }, - .block_erase = spi_block_erase_5c, + .block_erase = SPI_BLOCK_ERASE_5C, }, { .eraseblocks = { {32 * 1024, 8192} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 4096} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 4096} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {65536 * 1024, 4} }, - .block_erase = spi_block_erase_c4, + .block_erase = SPI_BLOCK_ERASE_C4, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -11481,37 +12503,37 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 65536} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 65536} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 8192} }, - .block_erase = spi_block_erase_5c, + .block_erase = SPI_BLOCK_ERASE_5C, }, { .eraseblocks = { {32 * 1024, 8192} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 4096} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 4096} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {65536 * 1024, 4} }, - .block_erase = spi_block_erase_c4, + .block_erase = SPI_BLOCK_ERASE_C4, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1700, 2000}, }, @@ -11527,31 +12549,31 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 512} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16384 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, { .eraseblocks = { {16384 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1700, 2000}, }, @@ -11565,33 +12587,33 @@ const struct flashchip flashchips[] = { .page_size = 256, /* supports SFDP */ /* OTP: 64B total; read 0x4B, write 0x42 */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN, - .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 512} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16384 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, { .eraseblocks = { {16384 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -11606,41 +12628,41 @@ const struct flashchip flashchips[] = { /* supports SFDP */ /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN, - .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_5c, + .block_erase = SPI_BLOCK_ERASE_5C, }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32768 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, { .eraseblocks = { {32768 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -11655,41 +12677,41 @@ const struct flashchip flashchips[] = { /* supports SFDP */ /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN, - .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_5c, + .block_erase = SPI_BLOCK_ERASE_5C, }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32768 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, { .eraseblocks = { {32768 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1700, 2000}, }, @@ -11705,41 +12727,48 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 16384} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 16384} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 2048} }, - .block_erase = spi_block_erase_5c, + .block_erase = SPI_BLOCK_ERASE_5C, }, { .eraseblocks = { {32 * 1024, 2048} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 1024} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 1024} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {65536 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, { .eraseblocks = { {65536 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}}, + .tb = {STATUS1, 5, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -11754,40 +12783,40 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 16384} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 16384} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 2048} }, - .block_erase = spi_block_erase_5c, + .block_erase = SPI_BLOCK_ERASE_5C, }, { .eraseblocks = { {32 * 1024, 2048} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 1024} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 1024} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {65536 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, { .eraseblocks = { {65536 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {1700, 2000}, }, @@ -11801,20 +12830,20 @@ const struct flashchip flashchips[] = { .page_size = 512, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {512, 128} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -11828,20 +12857,20 @@ const struct flashchip flashchips[] = { .page_size = 512, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {512, 128} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -11855,20 +12884,20 @@ const struct flashchip flashchips[] = { .page_size = 1024, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {1024, 512} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -11882,20 +12911,20 @@ const struct flashchip flashchips[] = { .page_size = 1024, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {1024, 512} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -11909,20 +12938,20 @@ const struct flashchip flashchips[] = { .page_size = 512, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {512, 128} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -11936,20 +12965,20 @@ const struct flashchip flashchips[] = { .page_size = 512, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {512, 256} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -11963,20 +12992,20 @@ const struct flashchip flashchips[] = { .page_size = 512, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {512, 512} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -11990,34 +13019,34 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 2} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B), dual I/O read (0x3B) supported */ .voltage = {2700, 3600}, }, @@ -12031,28 +13060,28 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2048 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2048 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B), dual I/O read (0x3B) supported */ .voltage = {2700, 3600}, }, @@ -12066,34 +13095,34 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {32 * 1024, 8} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B), dual I/O read (0x3B) supported */ .voltage = {2700, 3600}, }, @@ -12107,34 +13136,34 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {32 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B), dual I/O read (0x3B) supported */ .voltage = {2700, 3600}, }, @@ -12148,31 +13177,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B), dual I/O read (0x3B) supported */ .voltage = {2700, 3600}, }, @@ -12186,31 +13215,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */ - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, /* FIXME: C version supports "Safe Guard" */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B), dual I/O supported */ .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD010 */ }, @@ -12224,31 +13253,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */ - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, /* FIXME: C version supports "Safe Guard" */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B), dual I/O supported */ .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD020 */ }, @@ -12262,31 +13291,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B), dual I/O supported */ .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD040 */ }, @@ -12300,31 +13329,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 8} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 8} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {32 * 1024, 1} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {32 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B), dual I/O supported */ .voltage = {2700, 3600}, }, @@ -12338,31 +13367,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 16} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 16} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {32 * 1024, 2} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */ - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, /* FIXME: C version supports "Safe Guard" */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B), dual I/O supported */ .voltage = {2300, 3600}, }, @@ -12377,31 +13406,31 @@ const struct flashchip flashchips[] = { /* OTP: 256B total; read 0x4B, write 0xB1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2048 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2048 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2300, 3600}, }, @@ -12416,31 +13445,31 @@ const struct flashchip flashchips[] = { /* OTP: 256B total; read 0x4B, write 0xB1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2300, 3600}, }, @@ -12455,31 +13484,31 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0xB1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4096 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4096 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -12494,31 +13523,31 @@ const struct flashchip flashchips[] = { /* OTP: 256B total; read 0x4B, write 0xB1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2300, 3600}, }, @@ -12533,31 +13562,31 @@ const struct flashchip flashchips[] = { /* OTP: 64B total; read 0x4B, write 0xB1 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2300, 3600}, }, @@ -12571,25 +13600,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_res2, /* The continuation code is transferred as the 3rd byte m( */ + .probe = PROBE_SPI_RES2, /* The continuation code is transferred as the 3rd byte m( */ .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp1_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -12603,25 +13632,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp1_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -12635,31 +13664,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -12673,25 +13702,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -12705,25 +13734,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -12737,31 +13766,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -12775,25 +13804,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_res2, /* The continuation code is transferred as the 3rd byte m( */ + .probe = PROBE_SPI_RES2, /* The continuation code is transferred as the 3rd byte m( */ .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 16} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {32 * 1024, 2} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp1_srwd, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -12807,7 +13836,7 @@ const struct flashchip flashchips[] = { .page_size = 8 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_FIXME, .block_erasers = { @@ -12818,14 +13847,14 @@ const struct flashchip flashchips[] = { {96 * 1024, 1}, {128 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -12839,7 +13868,7 @@ const struct flashchip flashchips[] = { .page_size = 8 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_FIXME, .block_erasers = { @@ -12850,14 +13879,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -12871,23 +13900,23 @@ const struct flashchip flashchips[] = { .page_size = 4096, .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 2} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -12901,23 +13930,23 @@ const struct flashchip flashchips[] = { .page_size = 4096, .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -12931,23 +13960,23 @@ const struct flashchip flashchips[] = { .page_size = 4096, .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_OK_PR, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -12961,23 +13990,23 @@ const struct flashchip flashchips[] = { .page_size = 4096, .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {4 * 1024, 16} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -12991,24 +14020,24 @@ const struct flashchip flashchips[] = { .page_size = 16 * 1024, .feature_bits = FEATURE_REGISTERMAP | FEATURE_EITHER_RESET, .tested = TEST_OK_PR, - .probe = probe_jedec, - .probe_timing = TIMING_ZERO, /* routine is wrapper to probe_jedec (pm49fl00x.c) */ + .probe = PROBE_JEDEC, + .probe_timing = TIMING_ZERO, /* routine is wrapper to JEDEC (pm49fl00x.c) */ .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {16 * 1024, 16} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .unlock = unlock_regspace2_uniform_32k, - .write = write_jedec_1, - .read = read_memmapped, + .unlock = UNLOCK_REGSPACE2_UNIFORM_32K, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -13022,24 +14051,24 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_REGISTERMAP | FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .unlock = unlock_regspace2_uniform_64k, - .write = write_jedec_1, - .read = read_memmapped, + .unlock = UNLOCK_REGSPACE2_UNIFORM_64K, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -13053,25 +14082,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PREW, - .probe = probe_spi_rems, + .probe = PROBE_SPI_REMS, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 8} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_SST25, /* FIXME: No BP2 & 3 */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE1, /* AAI supported, but opcode is 0xAF */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -13085,25 +14114,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PREW, - .probe = probe_spi_res2, + .probe = PROBE_SPI_RES2, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, }, - .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */ - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_SST25, /* TODO: check */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE1, /* AAI supported, but opcode is 0xAF */ + .read = SPI_CHIP_READ, .voltage = {3000, 3600}, }, @@ -13117,25 +14146,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EITHER, .tested = TEST_UNTESTED, - .probe = probe_spi_res2, + .probe = PROBE_SPI_RES2, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, }, - .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */ - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_SST25, /* TODO: check */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE1, /* AAI supported, but opcode is 0xAF */ + .read = SPI_CHIP_READ, .voltage = {3000, 3600}, }, @@ -13149,31 +14178,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PREW, - .probe = probe_spi_rems, + .probe = PROBE_SPI_REMS, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_d8, /* Supported by SST25VF010A only */ + .block_erase = SPI_BLOCK_ERASE_D8, /* Supported by SST25VF010A only */ }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, /* Supported by SST25VF010A only */ + .block_erase = SPI_BLOCK_ERASE_C7, /* Supported by SST25VF010A only */ }, }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) supported by SST25VF010A only */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_SST25, /* FIXME: No BP2 & 3 */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE1, /* AAI supported, but opcode is 0xAF */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported by SST25VF010A only */ .voltage = {2700, 3600}, }, @@ -13187,31 +14216,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EITHER, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 64} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_sst25vf016, - .unlock = spi_disable_blockprotect, - .write = spi_aai_write, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_SST25VF016, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_WRITE_AAI, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -13225,25 +14254,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_UNTESTED, - .probe = probe_spi_rems, + .probe = PROBE_SPI_REMS, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 8} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, }, - .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 */ - .read = spi_chip_read, /* only */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_SST25, /* FIXME: No BP2 & 3 */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE1, /* AAI supported, but opcode is 0xAF */ + .read = SPI_CHIP_READ, /* only */ .voltage = {2700, 3600}, }, @@ -13257,31 +14286,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 8} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .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) */ - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_SST25, /* FIXME: No BP2 & 3 and 2nd SR */ + .unlock = SPI_DISABLE_BLOCKPROTECT, /* FIXME: 2nd SR */ + .write = SPI_WRITE_AAI, /* AAI supported (0xAD) */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -13295,31 +14324,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 128} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */ - .unlock = spi_disable_blockprotect, - .write = spi_aai_write, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_SST25, /* TODO: check */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_WRITE_AAI, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -13333,25 +14362,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PR, - .probe = probe_spi_rems, + .probe = PROBE_SPI_REMS, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, }, - .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */ - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_SST25, /* TODO: check */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE1, /* AAI supported, but opcode is 0xAF */ + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -13365,31 +14394,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_sst25vf040b, - .unlock = spi_disable_blockprotect, - .write = spi_aai_write, /* AAI supported (0xAD) */ - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_SST25VF040B, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_WRITE_AAI, /* AAI supported (0xAD) */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -13403,31 +14432,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PREW, - .probe = probe_spi_rems, + .probe = PROBE_SPI_REMS, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_sst25vf040b, - .unlock = spi_disable_blockprotect, - .write = spi_aai_write, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_SST25VF040B, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_WRITE_AAI, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -13441,31 +14470,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 256} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_SST25, /* TODO: check */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -13479,31 +14508,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */ - .unlock = spi_disable_blockprotect, - .write = spi_aai_write, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_SST25, /* TODO: check */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_WRITE_AAI, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -13517,31 +14546,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PREW, - .probe = probe_spi_rems, + .probe = PROBE_SPI_REMS, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 16} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 2} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {32 * 1024, 2} }, - .block_erase = spi_block_erase_d8, /* Supported by SST25VF512A only */ + .block_erase = SPI_BLOCK_ERASE_D8, /* Supported by SST25VF512A only */ }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_c7, /* Supported by SST25VF512A only */ + .block_erase = SPI_BLOCK_ERASE_C7, /* Supported by SST25VF512A only */ }, }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) supported by SST25VF512A only */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_SST25, /* FIXME: No BP2 & 3 */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE1, /* AAI supported, but opcode is 0xAF */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported by SST25VF512A only */ .voltage = {2700, 3600}, }, @@ -13555,28 +14584,28 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EITHER, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {1024 * 128, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 128, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */ - .unlock = spi_disable_blockprotect_bp2_srwd, - .write = spi_aai_write, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_SST25, /* FIXME: does not have a BP3 */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_WRITE_AAI, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {1650, 1950}, }, @@ -13590,31 +14619,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EITHER, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 8} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 256, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 256, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */ - .unlock = spi_disable_blockprotect_bp2_srwd, - .write = spi_aai_write, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_SST25, /* FIXME: does not have a BP3 */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_WRITE_AAI, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {1650, 1950}, }, @@ -13628,28 +14657,28 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_bp2_tb_bpl, - .unlock = spi_disable_blockprotect_bp2_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_TB_BPL, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {1650, 1950}, }, @@ -13663,31 +14692,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EITHER, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 512, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 512, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */ - .unlock = spi_disable_blockprotect_bp2_srwd, - .write = spi_aai_write, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_SST25, /* FIXME: does not have a BP3 */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_WRITE_AAI, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {1650, 1950}, }, @@ -13701,28 +14730,28 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_bp2_tb_bpl, - .unlock = spi_disable_blockprotect_bp2_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B), dual O (0x3B), dual I/O read (0xBB) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_TB_BPL, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B), dual O (0x3B), dual I/O read (0xBB) supported */ .voltage = {1650, 1950}, }, @@ -13736,31 +14765,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EITHER, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_sst25, /* *does* have a BP3 but it is useless */ - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_aai_write, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_SST25, /* *does* have a BP3 but it is useless */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_WRITE_AAI, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {1650, 1950}, }, @@ -13774,28 +14803,28 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_bp2_tb_bpl, - .unlock = spi_disable_blockprotect_bp2_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B), dual O (0x3B), dual I/O read (0xBB) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_TB_BPL, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B), dual O (0x3B), dual I/O read (0xBB) supported */ .voltage = {1650, 1950}, }, @@ -13809,28 +14838,28 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_EITHER, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 16} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 2} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {1024 * 64, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 64, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */ - .unlock = spi_disable_blockprotect_bp2_srwd, - .write = spi_aai_write, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_SST25, /* FIXME: does not have a BP3 */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_WRITE_AAI, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {1650, 1950}, }, @@ -13844,13 +14873,13 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {8 * 1024, 4}, @@ -13859,16 +14888,16 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {8 * 1024, 4}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect_sst26_global_unprotect, - .write = spi_chip_write_256, /* Multi I/O supported */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT_SST26_GLOBAL_UNPROTECT, + .write = SPI_CHIP_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -13882,13 +14911,13 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {8 * 1024, 4}, @@ -13897,16 +14926,16 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {8 * 1024, 4}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect_sst26_global_unprotect, - .write = spi_chip_write_256, /* Multi I/O supported */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT_SST26_GLOBAL_UNPROTECT, + .write = SPI_CHIP_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -13920,13 +14949,13 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {8 * 1024, 4}, @@ -13935,16 +14964,16 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {8 * 1024, 4}, }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect_sst26_global_unprotect, - .write = spi_chip_write_256, /* Multi I/O supported */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT_SST26_GLOBAL_UNPROTECT, + .write = SPI_CHIP_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -13958,21 +14987,21 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = 0, .tested = TEST_UNTESTED, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst28sf040.c) */ .block_erasers = { { .eraseblocks = { {128, 4096} }, - .block_erase = erase_sector_28sf040, + .block_erase = ERASE_SECTOR_28SF040, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_28sf040, + .block_erase = ERASE_CHIP_28SF040, } }, - .unlock = unprotect_28sf040, - .write = write_28sf040, - .read = read_memmapped, + .unlock = UNPROTECT_28SF040, + .write = WRITE_28SF040, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -13986,17 +15015,17 @@ const struct flashchip flashchips[] = { .page_size = 128, .feature_bits = FEATURE_LONG_RESET, .tested = TEST_OK_PR, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec, - .read = read_memmapped, + .write = WRITE_JEDEC, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -14010,17 +15039,17 @@ const struct flashchip flashchips[] = { .page_size = 128, .feature_bits = FEATURE_LONG_RESET, .tested = TEST_OK_PRE, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec, - .read = read_memmapped, + .write = WRITE_JEDEC, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -14034,17 +15063,17 @@ const struct flashchip flashchips[] = { .page_size = 128, .feature_bits = FEATURE_LONG_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec, - .read = read_memmapped, + .write = WRITE_JEDEC, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -14058,17 +15087,17 @@ const struct flashchip flashchips[] = { .page_size = 128, .feature_bits = FEATURE_LONG_RESET, .tested = TEST_OK_PRE, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec, - .read = read_memmapped, + .write = WRITE_JEDEC, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -14082,20 +15111,20 @@ const struct flashchip flashchips[] = { .page_size = 4096, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -14109,20 +15138,20 @@ const struct flashchip flashchips[] = { .page_size = 4096, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -14136,20 +15165,20 @@ const struct flashchip flashchips[] = { .page_size = 4096, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -14163,20 +15192,20 @@ const struct flashchip flashchips[] = { .page_size = 4096, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 16} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -14190,20 +15219,20 @@ const struct flashchip flashchips[] = { .page_size = 4096, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -14217,20 +15246,20 @@ const struct flashchip flashchips[] = { .page_size = 4096, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -14244,20 +15273,20 @@ const struct flashchip flashchips[] = { .page_size = 4096, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -14271,23 +15300,23 @@ const struct flashchip flashchips[] = { .page_size = 4096, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -14301,20 +15330,20 @@ const struct flashchip flashchips[] = { .page_size = 4096, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 16} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -14328,25 +15357,25 @@ const struct flashchip flashchips[] = { .page_size = 16 * 1024, .feature_bits = FEATURE_REGISTERMAP | FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {16 * 1024, 16} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */ + .block_erase = NO_BLOCK_ERASE_FUNC, /* AA 55 80 AA 55 10, only in A/A mux mode */ } }, - .printlock = printlock_sst_fwhub, - .unlock = unlock_sst_fwhub, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_SST_FWHUB, + .unlock = UNLOCK_SST_FWHUB, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -14360,25 +15389,25 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_REGISTERMAP | FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 96} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 6} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {384 * 1024, 1} }, - .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */ + .block_erase = NO_BLOCK_ERASE_FUNC, /* AA 55 80 AA 55 10, only in A/A mux mode */ } }, - .printlock = printlock_sst_fwhub, - .unlock = unlock_sst_fwhub, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_SST_FWHUB, + .unlock = UNLOCK_SST_FWHUB, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -14395,25 +15424,25 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_REGISTERMAP | FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */ + .block_erase = NO_BLOCK_ERASE_FUNC, /* AA 55 80 AA 55 10, only in A/A mux mode */ }, }, - .printlock = printlock_sst_fwhub, - .unlock = unlock_sst_fwhub, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_SST_FWHUB, + .unlock = UNLOCK_SST_FWHUB, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -14427,13 +15456,13 @@ const struct flashchip flashchips[] = { .page_size = 4 * 1024, .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_UNTESTED, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */ .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = erase_sector_49lfxxxc, + .block_erase = ERASE_SECTOR_49LFXXXC, }, { .eraseblocks = { {64 * 1024, 7}, @@ -14441,13 +15470,13 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, } }, - .printlock = printlock_regspace2_block_eraser_1, - .unlock = unlock_regspace2_block_eraser_1, - .write = write_82802ab, - .read = read_memmapped, + .printlock = PRINTLOCK_REGSPACE2_BLOCK_ERASER_1, + .unlock = UNLOCK_REGSPACE2_BLOCK_ERASER_1, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -14461,25 +15490,25 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_REGISTERMAP | FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */ + .block_erase = NO_BLOCK_ERASE_FUNC, /* AA 55 80 AA 55 10, only in A/A mux mode */ } }, - .printlock = printlock_sst_fwhub, - .unlock = unlock_sst_fwhub, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_SST_FWHUB, + .unlock = UNLOCK_SST_FWHUB, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -14493,13 +15522,13 @@ const struct flashchip flashchips[] = { .page_size = 4 * 1024, .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_UNTESTED, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */ .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = erase_sector_49lfxxxc, + .block_erase = ERASE_SECTOR_49LFXXXC, }, { .eraseblocks = { {64 * 1024, 15}, @@ -14507,13 +15536,13 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, } }, - .printlock = printlock_regspace2_block_eraser_1, - .unlock = unlock_regspace2_block_eraser_1, - .write = write_82802ab, - .read = read_memmapped, + .printlock = PRINTLOCK_REGSPACE2_BLOCK_ERASER_1, + .unlock = UNLOCK_REGSPACE2_BLOCK_ERASER_1, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -14527,13 +15556,13 @@ const struct flashchip flashchips[] = { .page_size = 4 * 1024, .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_OK_PREW, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */ .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = erase_sector_49lfxxxc, + .block_erase = ERASE_SECTOR_49LFXXXC, }, { .eraseblocks = { {64 * 1024, 31}, @@ -14541,13 +15570,13 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, } }, - .printlock = printlock_regspace2_block_eraser_1, - .unlock = unlock_regspace2_block_eraser_1, - .write = write_82802ab, - .read = read_memmapped, + .printlock = PRINTLOCK_REGSPACE2_BLOCK_ERASER_1, + .unlock = UNLOCK_REGSPACE2_BLOCK_ERASER_1, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -14561,23 +15590,23 @@ const struct flashchip flashchips[] = { .page_size = 16 * 1024, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {16 * 1024, 16} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = NULL, + .block_erase = NO_BLOCK_ERASE_FUNC, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -14591,23 +15620,23 @@ const struct flashchip flashchips[] = { .page_size = 4 * 1024, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PRE, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {16 * 1024, 16} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = NULL, + .block_erase = NO_BLOCK_ERASE_FUNC, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -14621,23 +15650,23 @@ const struct flashchip flashchips[] = { .page_size = 4096, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = NULL, + .block_erase = NO_BLOCK_ERASE_FUNC, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -14651,24 +15680,24 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_EITHER_RESET | FEATURE_REGISTERMAP, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 1, /* 150ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = NULL, + .block_erase = NO_BLOCK_ERASE_FUNC, } }, - .unlock = unlock_regspace2_uniform_64k, - .write = write_jedec_1, - .read = read_memmapped, + .unlock = UNLOCK_REGSPACE2_UNIFORM_64K, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -14682,23 +15711,23 @@ const struct flashchip flashchips[] = { .page_size = 4096, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_FIXME, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = NULL, + .block_erase = NO_BLOCK_ERASE_FUNC, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -14712,13 +15741,13 @@ const struct flashchip flashchips[] = { .page_size = 4 * 1024, .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_OK_PR, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */ .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = erase_sector_49lfxxxc, + .block_erase = ERASE_SECTOR_49LFXXXC, }, { .eraseblocks = { {64 * 1024, 31}, @@ -14726,13 +15755,13 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, } }, - .printlock = printlock_regspace2_block_eraser_1, - .unlock = unlock_regspace2_block_eraser_1, - .write = write_82802ab, - .read = read_memmapped, + .printlock = PRINTLOCK_REGSPACE2_BLOCK_ERASER_1, + .unlock = UNLOCK_REGSPACE2_BLOCK_ERASER_1, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -14746,7 +15775,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -14757,14 +15786,14 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 3}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4750, 5250}, /* 4.75-5.25V for type -X, others 4.5-5.5V */ }, @@ -14778,7 +15807,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -14789,14 +15818,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4750, 5250}, /* 4.75-5.25V for type -X, others 4.5-5.5V */ }, @@ -14810,20 +15839,20 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* datasheet specifies no timing */ .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -14838,7 +15867,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt .block_erasers = { @@ -14849,14 +15878,14 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 7}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -14871,7 +15900,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt .block_erasers = { @@ -14882,14 +15911,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -14903,20 +15932,20 @@ const struct flashchip flashchips[] = { .page_size = 16 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {16 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -14930,20 +15959,20 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -14957,17 +15986,17 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -14981,7 +16010,7 @@ const struct flashchip flashchips[] = { .page_size = 0, .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_UNTESTED, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_FIXME, .block_erasers = { @@ -14992,15 +16021,15 @@ const struct flashchip flashchips[] = { {4 * 1024, 16}, /* sector */ {4 * 1024, 16}, /* sector */ }, - .block_erase = erase_sector_stm50, + .block_erase = STM50_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, } }, - .unlock = unlock_regspace2_uniform_64k, - .write = write_82802ab, - .read = read_memmapped, + .unlock = UNLOCK_REGSPACE2_UNIFORM_64K, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* Also has 12V fast program & erase */ }, @@ -15014,7 +16043,7 @@ const struct flashchip flashchips[] = { .page_size = 0, .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_UNTESTED, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_FIXME, .block_erasers = { @@ -15025,15 +16054,15 @@ const struct flashchip flashchips[] = { {64 * 1024, 5}, /* block */ {4 * 1024, 16}, /* sector */ }, - .block_erase = erase_sector_stm50, + .block_erase = STM50_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, } }, - .unlock = unlock_regspace2_uniform_64k, - .write = write_82802ab, - .read = read_memmapped, + .unlock = UNLOCK_REGSPACE2_UNIFORM_64K, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* Also has 12V fast program & erase */ }, @@ -15047,7 +16076,7 @@ const struct flashchip flashchips[] = { .page_size = 0, .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_OK_PR, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_FIXME, .block_erasers = { @@ -15058,16 +16087,16 @@ const struct flashchip flashchips[] = { {4 * 1024, 16}, /* sector */ {4 * 1024, 16}, /* sector */ }, - .block_erase = erase_sector_stm50, + .block_erase = STM50_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, } }, - .printlock = printlock_regspace2_block_eraser_0, - .unlock = unlock_regspace2_block_eraser_0, - .write = write_82802ab, - .read = read_memmapped, + .printlock = PRINTLOCK_REGSPACE2_BLOCK_ERASER_0, + .unlock = UNLOCK_REGSPACE2_BLOCK_ERASER_0, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* Also has 12V fast program & erase */ }, @@ -15081,7 +16110,7 @@ const struct flashchip flashchips[] = { .page_size = 0, .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_UNTESTED, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_FIXME, .block_erasers = { @@ -15092,16 +16121,16 @@ const struct flashchip flashchips[] = { {64 * 1024, 13}, /* block */ {4 * 1024, 16}, /* sector */ }, - .block_erase = erase_sector_stm50, + .block_erase = STM50_SECTOR_ERASE, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, } }, - .printlock = printlock_regspace2_block_eraser_0, - .unlock = unlock_regspace2_block_eraser_0, - .write = write_82802ab, - .read = read_memmapped, + .printlock = PRINTLOCK_REGSPACE2_BLOCK_ERASER_0, + .unlock = UNLOCK_REGSPACE2_BLOCK_ERASER_0, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* Also has 12V fast program & erase */ }, @@ -15115,7 +16144,7 @@ const struct flashchip flashchips[] = { .page_size = 0, .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_OK_PR, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */ .block_erasers = { @@ -15126,16 +16155,16 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = NULL, /* Only in A/A mux mode */ + .block_erase = NO_BLOCK_ERASE_FUNC, /* Only in A/A mux mode */ } }, - .printlock = printlock_regspace2_block_eraser_0, - .unlock = unlock_regspace2_block_eraser_0, - .write = write_82802ab, - .read = read_memmapped, + .printlock = PRINTLOCK_REGSPACE2_BLOCK_ERASER_0, + .unlock = UNLOCK_REGSPACE2_BLOCK_ERASER_0, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* Also has 12V fast program & erase */ }, @@ -15149,18 +16178,18 @@ const struct flashchip flashchips[] = { .page_size = 0, .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_UNTESTED, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */ .block_erasers = { { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, } }, - .unlock = unlock_regspace2_uniform_64k, - .write = write_82802ab, - .read = read_memmapped, + .unlock = UNLOCK_REGSPACE2_UNIFORM_64K, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* Also has 12V fast program & erase */ }, @@ -15174,18 +16203,18 @@ const struct flashchip flashchips[] = { .page_size = 0, .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_OK_PR, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */ .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, } }, - .unlock = unlock_regspace2_uniform_64k, - .write = write_82802ab, - .read = read_memmapped, + .unlock = UNLOCK_REGSPACE2_UNIFORM_64K, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* Also has 12V fast program & erase */ }, @@ -15199,18 +16228,18 @@ const struct flashchip flashchips[] = { .page_size = 0, .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_OK_PR, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */ .block_erasers = { { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, } }, - .unlock = unlock_regspace2_uniform_64k, - .write = write_82802ab, - .read = read_memmapped, + .unlock = UNLOCK_REGSPACE2_UNIFORM_64K, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* Also has 12V fast program & erase */ }, @@ -15224,18 +16253,18 @@ const struct flashchip flashchips[] = { .page_size = 0, .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_UNTESTED, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, } }, - .unlock = unlock_regspace2_uniform_64k, - .write = write_82802ab, - .read = read_memmapped, + .unlock = UNLOCK_REGSPACE2_UNIFORM_64K, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* Also has 12V fast program & erase */ }, @@ -15249,7 +16278,7 @@ const struct flashchip flashchips[] = { .page_size = 0, .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_UNTESTED, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -15261,13 +16290,13 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, } }, - .printlock = printlock_regspace2_block_eraser_0, - .unlock = unlock_regspace2_block_eraser_0, - .write = write_82802ab, - .read = read_memmapped, + .printlock = PRINTLOCK_REGSPACE2_BLOCK_ERASER_0, + .unlock = UNLOCK_REGSPACE2_BLOCK_ERASER_0, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* Also has 12V fast program & erase */ }, @@ -15281,20 +16310,20 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO, .tested = TEST_OK_PREW, - .probe = probe_spi_st95, + .probe = PROBE_SPI_ST95, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_emulation, + .block_erase = SPI_BLOCK_ERASE_EMULATION, } }, - .printlock = spi_prettyprint_status_register_bp1_srwd, - .unlock = spi_disable_blockprotect_bp1_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP1_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2500, 5500}, }, @@ -15308,27 +16337,27 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_res2, + .probe = PROBE_SPI_RES2, .probe_timing = TIMING_ZERO, .block_erasers = { /* FIXME: Is this correct? { .eraseblocks = { {2 * 1024, 64} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, },*/ { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp1_srwd, - .unlock = spi_disable_blockprotect_bp1_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP1_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2300, 3600}, }, @@ -15342,25 +16371,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_res2, + .probe = PROBE_SPI_RES2, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp1_srwd, - .unlock = spi_disable_blockprotect_bp1_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP1_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2300, 3600}, }, @@ -15373,31 +16402,31 @@ const struct flashchip flashchips[] = { .total_size = 256, .page_size = 256, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */ - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, /* #WP pin write-protects SRWP bit. */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2300, 3600}, }, @@ -15411,25 +16440,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_res2, + .probe = PROBE_SPI_RES2, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */ - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, /* #WP pin write-protects SRWP bit. */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2300, 3600}, }, @@ -15443,31 +16472,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect_bp2_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B), dual read (0x3B) and dual I/O (0xBB) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B), dual read (0x3B) and dual I/O (0xBB) supported */ .voltage = {2300, 3600}, }, @@ -15481,25 +16510,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_res2, + .probe = PROBE_SPI_RES2, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {2 * 1024, 64} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {32 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp1_srwd, /* FIXME: Add ERSER error flag. */ - .unlock = spi_disable_blockprotect_bp1_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, /* FIXME: Add ERSER error flag. */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP1_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -15512,25 +16541,25 @@ const struct flashchip flashchips[] = { .total_size = 256, .page_size = 256, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {256, 1024} }, - .block_erase = spi_block_erase_db, + .block_erase = SPI_BLOCK_ERASE_DB, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_default_welwip, - .unlock = NULL, /* #WP pin write-protects lower 64kB. */ - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_DEFAULT_WELWIP, + .unlock = NO_BLOCKPROTECT_FUNC, /* #WP pin write-protects lower 64kB. */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -15543,25 +16572,25 @@ const struct flashchip flashchips[] = { .total_size = 512, .page_size = 256, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {256, 2 * 1024} }, - .block_erase = spi_block_erase_db, + .block_erase = SPI_BLOCK_ERASE_DB, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_default_welwip, - .unlock = NULL, /* #WP pin write-protects lower 64kB. */ - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_DEFAULT_WELWIP, + .unlock = NO_BLOCKPROTECT_FUNC, /* #WP pin write-protects lower 64kB. */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -15575,25 +16604,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_res2, + .probe = PROBE_SPI_RES2, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -15607,25 +16636,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_res2, + .probe = PROBE_SPI_RES2, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */ - .write = spi_chip_write_256, - .read = spi_chip_read, /* some quad-read supported ("HD_READ mode") */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, /* #WP pin write-protects SRWP bit. */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* some quad-read supported ("HD_READ mode") */ .voltage = {2700, 3600}, }, @@ -15639,28 +16668,28 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_res2, + .probe = PROBE_SPI_RES2, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */ - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, /* #WP pin write-protects SRWP bit. */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -15674,25 +16703,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_res2, + .probe = PROBE_SPI_RES2, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {8 * 1024, 128} }, - .block_erase = spi_block_erase_d7, + .block_erase = SPI_BLOCK_ERASE_D7, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */ - .write = spi_chip_write_256, - .read = spi_chip_read, /* some quad-read supported ("HD_READ mode") */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, /* #WP pin write-protects SRWP bit. */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* some quad-read supported ("HD_READ mode") */ .voltage = {2700, 3600}, }, @@ -15705,7 +16734,7 @@ const struct flashchip flashchips[] = { .total_size = 1024, .page_size = 64 * 1024, .tested = TEST_OK_PREW, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -15714,15 +16743,15 @@ const struct flashchip flashchips[] = { {8 * 1024, 8}, {64 * 1024, 15} }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = erase_sector_49lfxxxc, + .block_erase = ERASE_SECTOR_49LFXXXC, } }, - .unlock = unlock_lh28f008bjt, - .write = write_82802ab, - .read = read_memmapped, + .unlock = UNLOCK_LH28F008BJT, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -15736,7 +16765,7 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_EITHER_RESET | FEATURE_REGISTERMAP, .tested = TEST_UNTESTED, - .probe = probe_82802ab, + .probe = PROBE_AT82802AB, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -15745,17 +16774,17 @@ const struct flashchip flashchips[] = { {64 * 1024, 15}, {8 * 1024, 8} }, - .block_erase = erase_block_82802ab, + .block_erase = ERASE_BLOCK_82802AB, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = NULL, /* 30 D0, only in A/A mux mode */ + .block_erase = NO_BLOCK_ERASE_FUNC, /* 30 D0, only in A/A mux mode */ }, }, - .unlock = unlock_regspace2_uniform_64k, - .write = write_82802ab, - .read = read_memmapped, + .unlock = UNLOCK_REGSPACE2_UNIFORM_64K, + .write = WRITE_82802AB, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -15769,22 +16798,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -15798,22 +16827,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PRE, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -15827,22 +16856,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -15856,22 +16885,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -15885,22 +16914,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -15915,28 +16944,28 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (S25FL116K only) */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 2048 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 2048 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, - .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */ - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, /* #WP pin write-protects SRWP bit. */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and dual I/O (0x3B) supported */ .voltage = {2700, 3600}, }, @@ -15952,25 +16981,25 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {256 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 16384 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 16384 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, /* #WP pin write-protects SRWP bit. */ + .write = SPI_CHIP_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -15987,7 +17016,7 @@ const struct flashchip flashchips[] = { .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, /* FIXME: we should distinguish the configuration on probing time like we do for AT45DB chips */ - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -16000,27 +17029,84 @@ const struct flashchip flashchips[] = { {4 * 1024, 32}, {64 * 1024, 254} // inaccessible }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { */ .eraseblocks = { { 64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 16384 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 16384 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, /* #WP pin write-protects SRWP bit. */ + .write = SPI_CHIP_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, { .vendor = "Spansion", + .name = "S25FL128L", + .bustype = BUS_SPI, + .manufacture_id = SPANSION_ID, + .model_id = SPANSION_S25FL128L, + .total_size = 16384, + .page_size = 256, + /* 4 x 256B Security Region (OTP) */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT3 | FEATURE_OTP, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 4096} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 256} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {16384 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {16384 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ + .voltage = {2700, 3600}, + .reg_bits = + { + /* + * Note: This chip has a read-only Status Register 2 that is not + * counted here. Registers are mapped as follows: + * STATUS1 ... Status Register 1 + * STATUS2 ... Configuration Register 1 + * STATUS3 ... Configuration Register 2 + */ + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + .wps = {STATUS3, 2, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, + }, + + { + .vendor = "Spansion", .name = "S25FL128P......0", /* uniform 64 kB sectors */ .bustype = BUS_SPI, .manufacture_id = SPANSION_ID, @@ -16029,28 +17115,28 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 16384 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 16384 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, - .unlock = spi_disable_blockprotect_bp3_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -16064,22 +17150,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {256 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 16384 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp2_srwd, - .unlock = spi_disable_blockprotect_bp2_srwd, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -16095,7 +17181,7 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -16107,22 +17193,22 @@ const struct flashchip flashchips[] = { {4 * 1024, 32}, {64 * 1024, 254} // inaccessible }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { */ .eraseblocks = { { 64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 16384 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 16384 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -16138,25 +17224,25 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {256 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 16384 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 16384 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -16170,24 +17256,24 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_big_spansion, + .probe = PROBE_SPI_BIG_SPANSION, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {128 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1700, 2000}, }, @@ -16201,24 +17287,24 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_big_spansion, + .probe = PROBE_SPI_BIG_SPANSION, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1700, 2000}, }, @@ -16233,7 +17319,7 @@ const struct flashchip flashchips[] = { /* OTP: 506B total, 16B reserved; read 0x4B; write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -16245,29 +17331,29 @@ const struct flashchip flashchips[] = { {4 * 1024, 32}, {64 * 1024, 254} // inaccessible }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { */ /* FIXME: Additionally it also supports erase opcode 40h for the respective 2*4 kB pairs .eraseblocks = { {8 * 1024, 16}, {64 * 1024, 254} // inaccessible }, - .block_erase = spi_block_erase_40, + .block_erase = SPI_BLOCK_ERASE_40, }, { */ .eraseblocks = { { 64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 16384 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 16384 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_EP_SRWD, /* TODO: Configuration register */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_CHIP_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -16282,25 +17368,25 @@ const struct flashchip flashchips[] = { /* OTP: 506B total, 16B reserved; read 0x4B; write 0x42 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {256 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 16384 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 16384 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_EP_SRWD, /* TODO: Configuration register */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_CHIP_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -16315,28 +17401,28 @@ const struct flashchip flashchips[] = { /* OTP: 768B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 4096 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 4096 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, /* #WP pin write-protects SRWP bit. */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -16351,28 +17437,28 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 8192 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 8192 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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, - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, /* #WP pin write-protects SRWP bit. */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -16386,28 +17472,28 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PR, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, - .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */ - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, /* #WP pin write-protects SRWP bit. */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and dual I/O (0x3B) supported */ .voltage = {2700, 3600}, }, @@ -16421,33 +17507,99 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_bp3_srwd, - .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */ - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, /* #WP pin write-protects SRWP bit. */ + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) and dual I/O (0x3B) supported */ .voltage = {2700, 3600}, }, { .vendor = "Spansion", + .name = "S25FL256L", + .bustype = BUS_SPI, + .manufacture_id = SPANSION_ID, + .model_id = SPANSION_S25FL256L, + .total_size = 32768, + .page_size = 256, + /* 4 x 256B Security Region (OTP) */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT3 | FEATURE_OTP | + FEATURE_4BA_ENTER | FEATURE_4BA_NATIVE, + .tested = TEST_UNTESTED, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 8192} }, + .block_erase = SPI_BLOCK_ERASE_21, + }, { + .eraseblocks = { {4 * 1024, 8192} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 1024} }, + .block_erase = SPI_BLOCK_ERASE_53, + }, { + .eraseblocks = { {32 * 1024, 1024} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_DC, + }, { + .eraseblocks = { {64 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {32768 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {32768 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ + .voltage = {2700, 3600}, + .reg_bits = + { + /* + * Note: This chip has a read-only Status Register 2 that is not + * counted here. Registers are mapped as follows: + * STATUS1 ... Status Register 1 + * STATUS2 ... Configuration Register 1 + * STATUS3 ... Configuration Register 2 + */ + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}}, + .tb = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + .wps = {STATUS3, 2, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, + }, + + { + .vendor = "Spansion", .name = "S25FL256S Large Sectors", .bustype = BUS_SPI, .manufacture_id = SPANSION_ID, @@ -16456,21 +17608,21 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_big_spansion, + .probe = PROBE_SPI_BIG_SPANSION, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {256 * 1024, 64} }, - .block_erase = s25fl_block_erase, + .block_erase = S25FL_BLOCK_ERASE, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, }, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1700, 2000}, }, @@ -16484,21 +17636,21 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_big_spansion, + .probe = PROBE_SPI_BIG_SPANSION, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = s25fl_block_erase, + .block_erase = S25FL_BLOCK_ERASE, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, }, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1700, 2000}, }, @@ -16511,9 +17663,10 @@ const struct flashchip flashchips[] = { .total_size = 32768, .page_size = 256, /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_EAR7, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | + FEATURE_4BA_NATIVE | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -16525,27 +17678,26 @@ const struct flashchip flashchips[] = { {4 * 1024, 32}, {64 * 1024, 254} // inaccessible }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { */ .eraseblocks = { { 64 * 1024, 512} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { { 64 * 1024, 512} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 32768 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 32768 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, - .wrea_override = 0x17, }, { @@ -16557,27 +17709,31 @@ const struct flashchip flashchips[] = { .total_size = 65536, /* 512 Mb (=> 64 MB)) */ .page_size = 256, /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_NATIVE, - .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | + FEATURE_4BA_NATIVE | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716, + .tested = TEST_UNTESTED, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { { 256 * 1024, 256} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, + }, { + .eraseblocks = { { 256 * 1024, 256} }, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { { 65536 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { { 65536 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .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 */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .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_WRITE256, /* Multi I/O supported, IGNORE for now */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -16591,24 +17747,24 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_big_spansion, + .probe = PROBE_SPI_BIG_SPANSION, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = s25fs_block_erase_d8, + .block_erase = S25FS_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1700, 2000}, }, @@ -16622,24 +17778,24 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_big_spansion, + .probe = PROBE_SPI_BIG_SPANSION, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = s25fs_block_erase_d8, + .block_erase = S25FS_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, }, }, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1700, 2000}, }, @@ -16653,20 +17809,20 @@ const struct flashchip flashchips[] = { .page_size = 512, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {512, 256} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -16680,20 +17836,20 @@ const struct flashchip flashchips[] = { .page_size = 512, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {512, 256} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -16707,20 +17863,20 @@ const struct flashchip flashchips[] = { .page_size = 512, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {512, 512} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, }, { @@ -16733,20 +17889,20 @@ const struct flashchip flashchips[] = { .page_size = 512, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {512, 512} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, }, { @@ -16759,20 +17915,20 @@ const struct flashchip flashchips[] = { .page_size = 1024, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {1024, 512} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -16786,20 +17942,20 @@ const struct flashchip flashchips[] = { .page_size = 1024, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {1024, 512} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -16813,20 +17969,20 @@ const struct flashchip flashchips[] = { .page_size = 1024, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {1024, 512} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -16840,20 +17996,20 @@ const struct flashchip flashchips[] = { .page_size = 1024, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { { .eraseblocks = { {1024, 512} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -16867,7 +18023,7 @@ const struct flashchip flashchips[] = { .page_size = 16384, /* Non-uniform sectors */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -16878,14 +18034,14 @@ const struct flashchip flashchips[] = { {32 * 1024, 1}, {64 * 1024, 3}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -16899,7 +18055,7 @@ const struct flashchip flashchips[] = { .page_size = 16384, /* Non-uniform sectors */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */ .block_erasers = { @@ -16910,14 +18066,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -16931,22 +18087,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2048 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -16960,22 +18116,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4096 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -16989,22 +18145,22 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, /* Fast read (0x0B) supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, /* Fast read (0x0B) supported */ .voltage = {2700, 3600}, }, @@ -17018,34 +18174,46 @@ const struct flashchip flashchips[] = { .page_size = 256, /* supports SFDP */ /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, - .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | + FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3, + .tested = TEST_OK_PREWB, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 512} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + .wps = {STATUS3, 2, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -17056,34 +18224,44 @@ const struct flashchip flashchips[] = { .model_id = WINBOND_NEX_W25Q128_V_M, .total_size = 16384, .page_size = 256, - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, - .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI | FEATURE_WRSR2, + .tested = TEST_OK_PREWB, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 512} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -17096,34 +18274,44 @@ const struct flashchip flashchips[] = { .page_size = 256, /* supports SFDP */ /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI | FEATURE_WRSR2, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 512} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 1950}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -17134,34 +18322,44 @@ const struct flashchip flashchips[] = { .model_id = WINBOND_NEX_W25Q128_DTR, .total_size = 16384, .page_size = 256, - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI | FEATURE_WRSR2, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 512} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 1950}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -17174,34 +18372,44 @@ const struct flashchip flashchips[] = { .page_size = 256, /* supports SFDP */ /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, - .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_WRSR2, + .tested = TEST_OK_PREWB, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 64} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -17216,31 +18424,31 @@ const struct flashchip flashchips[] = { /* QPI enable 0x38, disable 0xFF */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 64} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */ }, @@ -17255,37 +18463,37 @@ const struct flashchip flashchips[] = { /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 8} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */ }, { .vendor = "Winbond", - .name = "W25Q256.V", + .name = "W25Q256FV", .bustype = BUS_SPI, .manufacture_id = WINBOND_NEX_ID, .model_id = WINBOND_NEX_W25Q256_V, @@ -17293,36 +18501,100 @@ const struct flashchip flashchips[] = { .page_size = 256, /* supports SFDP */ /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ - /* FOUR_BYTE_ADDR: supports 4-bytes addressing mode */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_ENTER_WREN - | FEATURE_4BA_EXT_ADDR | FEATURE_4BA_READ | FEATURE_4BA_FAST_READ, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_ENTER_WREN | + FEATURE_4BA_EAR_C5C8 | FEATURE_4BA_READ | FEATURE_4BA_FAST_READ | + FEATURE_WRSR2, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}}, + .tb = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, + }, + + { + .vendor = "Winbond", + .name = "W25Q256JV_Q", + .bustype = BUS_SPI, + .manufacture_id = WINBOND_NEX_ID, + .model_id = WINBOND_NEX_W25Q256_V, + .total_size = 32768, + .page_size = 256, + /* supports SFDP */ + /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA | FEATURE_WRSR2, + .tested = TEST_UNTESTED, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 8192} }, + .block_erase = SPI_BLOCK_ERASE_21, + }, { + .eraseblocks = { {4 * 1024, 8192} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 1024} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_DC, + }, { + .eraseblocks = { {64 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {32 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {32 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}}, + .tb = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -17335,46 +18607,54 @@ const struct flashchip flashchips[] = { .page_size = 256, /* supports SFDP */ /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ - /* FOUR_BYTE_ADDR: supports 4-bytes addressing mode */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA | FEATURE_WRSR2, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}}, + .tb = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { .vendor = "Winbond", - .name = "W25Q256.W", + .name = "W25Q256JW", .bustype = BUS_SPI, .manufacture_id = WINBOND_NEX_ID, .model_id = WINBOND_NEX_W25Q256_W, @@ -17382,34 +18662,39 @@ const struct flashchip flashchips[] = { .page_size = 256, /* supports SFDP */ /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_ENTER_WREN - | FEATURE_4BA_EXT_ADDR | FEATURE_4BA_READ | FEATURE_4BA_FAST_READ, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_21, + }, { + .eraseblocks = { {4 * 1024, 8192} }, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 1950}, }, @@ -17423,46 +18708,56 @@ const struct flashchip flashchips[] = { .page_size = 256, /* supports SFDP */ /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ - /* FOUR_BYTE_ADDR: supports 4-bytes addressing mode */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA, - .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA | FEATURE_WRSR2 + | FEATURE_WRSR3, + .tested = TEST_OK_PREWB, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1700, 1950}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}}, + .tb = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + .wps = {STATUS3, 2, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { .vendor = "Winbond", - .name = "W25Q32.V", + .name = "W25Q32BV/W25Q32CV/W25Q32DV", .bustype = BUS_SPI, .manufacture_id = WINBOND_NEX_ID, .model_id = WINBOND_NEX_W25Q32_V, @@ -17470,74 +18765,354 @@ const struct flashchip flashchips[] = { .page_size = 256, /* supports SFDP */ /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_WRSR_EXT2, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 1024} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 64} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {4 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {4 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, + }, + + { + .vendor = "Winbond", + .name = "W25Q32FV", + .bustype = BUS_SPI, + .manufacture_id = WINBOND_NEX_ID, + .model_id = WINBOND_NEX_W25Q32_V, + .total_size = 4096, + .page_size = 256, + /* supports SFDP */ + /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI | + FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 128} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + .wps = {STATUS3, 2, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { .vendor = "Winbond", - .name = "W25Q32.W", + .name = "W25Q32JV", + .bustype = BUS_SPI, + .manufacture_id = WINBOND_NEX_ID, + .model_id = WINBOND_NEX_W25Q32_V, + .total_size = 4096, + .page_size = 256, + /* supports SFDP */ + /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | + FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 1024} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 64} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {4 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {4 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + .wps = {STATUS3, 2, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, + }, + + { + .vendor = "Winbond", + .name = "W25Q32BW/W25Q32CW/W25Q32DW", .bustype = BUS_SPI, .manufacture_id = WINBOND_NEX_ID, .model_id = WINBOND_NEX_W25Q32_W, .total_size = 4096, .page_size = 256, - /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ + /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ /* QPI enable 0x38, disable 0xFF */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI | FEATURE_WRSR_EXT2, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 1024} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 64} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {4 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {4 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */ + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, + }, + + { + .vendor = "Winbond", + .name = "W25Q32FW", + .bustype = BUS_SPI, + .manufacture_id = WINBOND_NEX_ID, + .model_id = WINBOND_NEX_W25Q32_W, + .total_size = 4096, + .page_size = 256, + /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ + /* QPI enable 0x38, disable 0xFF */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI | + FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 1024} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 64} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {4 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {4 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */ + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + .wps = {STATUS3, 2, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, + }, + + { + .vendor = "Winbond", + .name = "W25Q32JW...Q", + .bustype = BUS_SPI, + .manufacture_id = WINBOND_NEX_ID, + .model_id = WINBOND_NEX_W25Q32_W, + .total_size = 4096, + .page_size = 256, + /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ + /* QPI enable 0x38, disable 0xFF */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | + FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 128} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */ + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + .wps = {STATUS3, 2, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, + }, + + { + .vendor = "Winbond", + .name = "W25Q32JW...M", + .bustype = BUS_SPI, + .manufacture_id = WINBOND_NEX_ID, + .model_id = WINBOND_NEX_W25Q32JW_M, + .total_size = 4096, + .page_size = 256, + /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ + /* QPI enable 0x38, disable 0xFF */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | + FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_WRSR_EXT2, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 1024} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 64} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {4 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {4 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_TB_BPL, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {1700, 1950}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + .wps = {STATUS3, 2, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -17552,31 +19127,31 @@ const struct flashchip flashchips[] = { /* OTP: 756B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, /* Multi I/O supported */ - .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, /* Multi I/O supported */ + .read = SPI_CHIP_READ, /* Fast read (0x0B) and multi I/O supported */ .voltage = {2700, 3600}, }, @@ -17591,31 +19166,31 @@ const struct flashchip flashchips[] = { /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */ }, @@ -17630,31 +19205,31 @@ const struct flashchip flashchips[] = { /* OTP: 3*256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 1950}, /* Fast read (0x0B) and multi I/O supported */ }, @@ -17668,43 +19243,97 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 16384} }, - .block_erase = spi_block_erase_21, + .block_erase = SPI_BLOCK_ERASE_21, }, { .eraseblocks = { {4 * 1024, 16384} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 2048} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 1024} }, - .block_erase = spi_block_erase_dc, + .block_erase = SPI_BLOCK_ERASE_DC, }, { .eraseblocks = { {64 * 1024, 1024} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {64 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {64 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, { + .vendor = "Winbond", + .name = "W25Q512NW-IM", + .bustype = BUS_SPI, + .manufacture_id = WINBOND_NEX_ID, + .model_id = WINBOND_NEX_W25Q512NW_IM, + .total_size = 64 * 1024, + .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA | FEATURE_WRSR2 + | FEATURE_WRSR3, + .tested = TEST_OK_PREWB, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 16384} }, + .block_erase = SPI_BLOCK_ERASE_21, + }, { + .eraseblocks = { {4 * 1024, 16384} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 2048} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 1024} }, + .block_erase = SPI_BLOCK_ERASE_DC, + }, { + .eraseblocks = { {64 * 1024, 1024} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {64 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {64 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {1650, 1950}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}}, + .tb = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + .wps = {STATUS3, 2, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, + }, + + { .vendor = "Winbond", - .name = "W25Q64.V", + .name = "W25Q64BV/W25Q64CV/W25Q64FV", .bustype = BUS_SPI, .manufacture_id = WINBOND_NEX_ID, .model_id = WINBOND_NEX_W25Q64_V, @@ -17712,33 +19341,135 @@ const struct flashchip flashchips[] = { .page_size = 256, /* supports SFDP */ /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_WRSR2, + .tested = TEST_OK_PREWB, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 2048} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 256} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {8 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {8 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, + }, + + { + .vendor = "Winbond", + .name = "W25Q64JV-.Q", + .bustype = BUS_SPI, + .manufacture_id = WINBOND_NEX_ID, + .model_id = WINBOND_NEX_W25Q64_V, + .total_size = 8192, + .page_size = 256, + /* supports SFDP */ + /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | + FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 256} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + .wps = {STATUS3, 2, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, + }, + + { + .vendor = "Winbond", + .name = "W25Q64JV-.M", + .bustype = BUS_SPI, + .manufacture_id = WINBOND_NEX_ID, + .model_id = WINBOND_NEX_W25Q64JV, + .total_size = 8192, + .page_size = 256, + /* supports SFDP */ + /* QPI enable 0x38 */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 2048} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 256} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {8 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {8 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_TB_BPL, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP2_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -17752,74 +19483,95 @@ const struct flashchip flashchips[] = { .page_size = 256, /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ /* QPI enable 0x38, disable 0xFF */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, - .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI | FEATURE_WRSR2, + .tested = TEST_OK_PREWB, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 256} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */ + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { .vendor = "Winbond", - .name = "W25Q64JW", + .name = "W25Q64JW...M", .bustype = BUS_SPI, .manufacture_id = WINBOND_NEX_ID, - .model_id = WINBOND_NEX_W25Q64JW, + .model_id = WINBOND_NEX_W25Q64JW_M, .total_size = 8192, .page_size = 256, /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ /* QPI enable 0x38, disable 0xFF */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI | FEATURE_WRSR2 | FEATURE_WRSR3, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 256} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */ + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + .wps = {STATUS3, 2, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -17834,31 +19586,31 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -17873,31 +19625,31 @@ const struct flashchip flashchips[] = { /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */ }, @@ -17912,31 +19664,31 @@ const struct flashchip flashchips[] = { /* OTP: 3*256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 32} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {1 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 1950}, /* Fast read (0x0B) and multi I/O supported */ }, @@ -17950,25 +19702,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 16} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 2} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, } }, - .printlock = spi_prettyprint_status_register_plain, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2300, 3600}, }, @@ -17982,25 +19734,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 2} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -18014,31 +19766,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 512} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 64} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 32} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {2 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -18051,27 +19803,34 @@ const struct flashchip flashchips[] = { .total_size = 256, .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, - .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .tested = TEST_OK_PREWB, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}}, + .tb = {STATUS1, 5, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -18084,31 +19843,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 1024} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 128} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -18122,25 +19881,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -18154,31 +19913,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 256} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -18192,25 +19951,25 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -18225,17 +19984,17 @@ const struct flashchip flashchips[] = { .page_size = 128, .feature_bits = FEATURE_LONG_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, /* used datasheet for the W29C011A */ .block_erasers = { { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec, - .read = read_memmapped, + .write = WRITE_JEDEC, + .read = READ_MEMMAPPED, }, { @@ -18248,17 +20007,17 @@ const struct flashchip flashchips[] = { .page_size = 128, .feature_bits = FEATURE_LONG_RESET, .tested = TEST_OK_PREW, - .probe = probe_w29ee011, + .probe = PROBE_W29EE011, .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (w29ee011.c) */ .block_erasers = { { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec, - .read = read_memmapped, + .write = WRITE_JEDEC, + .read = READ_MEMMAPPED, }, { @@ -18271,17 +20030,17 @@ const struct flashchip flashchips[] = { .page_size = 128, .feature_bits = FEATURE_LONG_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec, - .read = read_memmapped, + .write = WRITE_JEDEC, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -18295,17 +20054,17 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_LONG_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec, - .read = read_memmapped, + .write = WRITE_JEDEC, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -18319,17 +20078,17 @@ const struct flashchip flashchips[] = { .page_size = 128, .feature_bits = FEATURE_LONG_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {64 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec, - .read = read_memmapped, + .write = WRITE_JEDEC, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -18343,7 +20102,7 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -18352,14 +20111,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 8}, {64 * 1024, 63}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -18373,20 +20132,20 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 64} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -18400,7 +20159,7 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -18409,14 +20168,14 @@ const struct flashchip flashchips[] = { {64 * 1024, 63}, {8 * 1024, 8}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {4 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -18430,7 +20189,7 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -18439,14 +20198,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 8}, {64 * 1024, 127}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -18460,20 +20219,20 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -18487,7 +20246,7 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { @@ -18496,14 +20255,14 @@ const struct flashchip flashchips[] = { {64 * 1024, 127}, {8 * 1024, 8}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -18517,20 +20276,20 @@ const struct flashchip flashchips[] = { .page_size = 128 * 1024, /* actual page size is 16 */ .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec_29gl, + .probe = PROBE_JEDEC_29GL, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {128 * 1024, 128} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, }, }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {2700, 3600}, }, @@ -18544,21 +20303,21 @@ const struct flashchip flashchips[] = { .page_size = 4 * 1024, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .printlock = printlock_w39f010, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_W39F010, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -18572,21 +20331,21 @@ const struct flashchip flashchips[] = { .page_size = 4 * 1024, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {4 * 1024, 32} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {128 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .printlock = printlock_w39l010, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_W39L010, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -18600,24 +20359,24 @@ const struct flashchip flashchips[] = { .page_size = 4 * 1024, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .printlock = printlock_w39l020, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_W39L020, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -18631,24 +20390,24 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PR, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .printlock = printlock_w39l040, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_W39L040, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -18662,21 +20421,21 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .printlock = printlock_w39v040a, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_W39V040A, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -18690,21 +20449,21 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .printlock = printlock_w39v040b, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_W39V040B, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -18718,21 +20477,21 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .printlock = printlock_w39v040c, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_W39V040C, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -18746,25 +20505,25 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_REGISTERMAP | FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = erase_block_jedec, + .block_erase = JEDEC_BLOCK_ERASE, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .printlock = printlock_w39v040fa, - .unlock = unlock_regspace2_uniform_64k, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_W39V040FA, + .unlock = UNLOCK_REGSPACE2_UNIFORM_64K, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -18778,22 +20537,22 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_REGISTERMAP | FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .printlock = printlock_w39v040fb, - .unlock = unlock_regspace2_uniform_64k, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_W39V040FB, + .unlock = UNLOCK_REGSPACE2_UNIFORM_64K, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* Also has 12V fast program */ }, @@ -18807,21 +20566,21 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_REGISTERMAP | FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .printlock = printlock_w39v040fc, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_W39V040FC, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* Also has 12V fast program */ }, @@ -18835,21 +20594,21 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .printlock = printlock_w39v080a, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_W39V080A, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -18863,22 +20622,22 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_REGISTERMAP | FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {64 * 1024, 16} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {1024 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .printlock = printlock_w39v080fa, - .unlock = unlock_regspace2_uniform_64k, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_W39V080FA, + .unlock = UNLOCK_REGSPACE2_UNIFORM_64K, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* Also has 12V fast program */ }, @@ -18892,21 +20651,21 @@ const struct flashchip flashchips[] = { .page_size = 64 * 1024, .feature_bits = FEATURE_REGISTERMAP | FEATURE_EITHER_RESET, .tested = TEST_UNTESTED, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .printlock = printlock_w39v080fa_dual, - .write = write_jedec_1, - .read = read_memmapped, + .printlock = PRINTLOCK_W39V080FA_DUAL, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, /* Also has 12V fast program */ }, @@ -18920,7 +20679,7 @@ const struct flashchip flashchips[] = { .page_size = 128, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { @@ -18931,14 +20690,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -18952,17 +20711,17 @@ const struct flashchip flashchips[] = { .page_size = 128, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PROBE, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {4500, 5500}, }, @@ -18976,7 +20735,7 @@ const struct flashchip flashchips[] = { .page_size = 128, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { @@ -18987,14 +20746,14 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, @@ -19008,7 +20767,7 @@ const struct flashchip flashchips[] = { .page_size = 128, .feature_bits = FEATURE_EITHER_RESET, .tested = TEST_OK_PREW, - .probe = probe_jedec, + .probe = PROBE_JEDEC, .probe_timing = 10, .block_erasers = { @@ -19019,19 +20778,57 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_sector_jedec, + .block_erase = JEDEC_SECTOR_ERASE, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = erase_chip_block_jedec, + .block_erase = JEDEC_CHIP_BLOCK_ERASE, } }, - .write = write_jedec_1, - .read = read_memmapped, + .write = WRITE_JEDEC1, + .read = READ_MEMMAPPED, .voltage = {3000, 3600}, }, { .vendor = "XMC", + .name = "XM25QH80B", + .bustype = BUS_SPI, + .manufacture_id = ST_ID, + .model_id = ST_M45PE80, + .total_size = 1024, + .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 256} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 32} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 16} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {1 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {1 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP2_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {2700, 3600}, + }, + + { + .vendor = "XMC", .name = "XM25QH64C", .bustype = BUS_SPI, .manufacture_id = ST_ID, @@ -19039,32 +20836,32 @@ const struct flashchip flashchips[] = { .total_size = 8192, .page_size = 256, .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, - .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 256} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -19078,70 +20875,128 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 2048} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 256} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 128} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 1950}, }, { .vendor = "XMC", + .name = "XM25QH128A", + .bustype = BUS_SPI, + .manufacture_id = ST_ID, + .model_id = XMC_XM25QH128A, + .total_size = 16384, + .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI | FEATURE_WRSR2, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 4096} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 256} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {16 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {16 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, + }, + + { + .vendor = "XMC", .name = "XM25QH128C", .bustype = BUS_SPI, .manufacture_id = ST_ID, .model_id = XMC_XM25QH128C, .total_size = 16384, .page_size = 256, - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI | FEATURE_WRSR2, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 512} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}}, + .tb = {STATUS1, 5, RW}, + .sec = {STATUS1, 6, RW}, + .cmp = {STATUS2, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -19156,31 +21011,31 @@ const struct flashchip flashchips[] = { /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 4096} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 512} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 256} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {16 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 1950}, }, @@ -19194,36 +21049,44 @@ const struct flashchip flashchips[] = { .page_size = 256, /* supports SFDP */ /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ - /* FOUR_BYTE_ADDR: supports 4-bytes addressing mode */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_ENTER_WREN - | FEATURE_4BA_EXT_ADDR | FEATURE_4BA_READ | FEATURE_4BA_FAST_READ, - .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_ENTER_WREN | + FEATURE_4BA_EAR_C5C8 | FEATURE_4BA_READ | FEATURE_4BA_FAST_READ | + FEATURE_4BA_WRITE | FEATURE_WRSR2, + .tested = TEST_OK_PR, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .srl = {STATUS2, 0, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}}, + .tb = {STATUS1, 6, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { @@ -19236,39 +21099,114 @@ const struct flashchip flashchips[] = { .page_size = 256, /* supports SFDP */ /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */ - /* FOUR_BYTE_ADDR: supports 4-bytes addressing mode */ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_ENTER_WREN - | FEATURE_4BA_EXT_ADDR | FEATURE_4BA_READ | FEATURE_4BA_FAST_READ, + | FEATURE_4BA_EAR_C5C8 | FEATURE_4BA_READ | FEATURE_4BA_FAST_READ + | FEATURE_4BA_WRITE, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 8192} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 1024} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 512} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {32 * 1024 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {1650, 1950}, }, { + .vendor = "XTX Technology Limited", + .name = "XT25F02E", + .bustype = BUS_SPI, + .manufacture_id = XTX_ID, + .model_id = XTX_XT25F02E, + .total_size = 256, + .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 64} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {64 * 1024, 4} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {256 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {256 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP1_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP1_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {2700, 3600}, + }, + + { + .vendor = "XTX Technology Limited", + .name = "XT25F64B", + .bustype = BUS_SPI, + .manufacture_id = XTX_ID, + .model_id = XTX_XT25F64B, + .total_size = 8 * 1024, + .page_size = 256, + /* Supports SFDP */ + /* OTP: 4 x 256 bytes */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 2048} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 256} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 128} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {8 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {8 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP4_SRWD, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {2700, 3600}, + }, + + { .vendor = "Zetta Device", .name = "ZD25D20", .bustype = BUS_SPI, @@ -19278,31 +21216,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 64} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 8} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 4} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {256 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -19316,31 +21254,31 @@ const struct flashchip flashchips[] = { .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = { { .eraseblocks = { {4 * 1024, 128} }, - .block_erase = spi_block_erase_20, + .block_erase = SPI_BLOCK_ERASE_20, }, { .eraseblocks = { {32 * 1024, 16} }, - .block_erase = spi_block_erase_52, + .block_erase = SPI_BLOCK_ERASE_52, }, { .eraseblocks = { {64 * 1024, 8} }, - .block_erase = spi_block_erase_d8, + .block_erase = SPI_BLOCK_ERASE_D8, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_60, + .block_erase = SPI_BLOCK_ERASE_60, }, { .eraseblocks = { {512 * 1024, 1} }, - .block_erase = spi_block_erase_c7, + .block_erase = SPI_BLOCK_ERASE_C7, } }, - .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */ - .unlock = spi_disable_blockprotect, - .write = spi_chip_write_256, - .read = spi_chip_read, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, /* TODO: improve */ + .unlock = SPI_DISABLE_BLOCKPROTECT, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, .voltage = {2700, 3600}, }, @@ -19357,11 +21295,11 @@ const struct flashchip flashchips[] = { /* want the default "This flash part has status UNTESTED..." */ /* text to be printed. */ .tested = TEST_OK_PREW, - .probe = probe_spi_sfdp, + .probe = PROBE_SPI_SFDP, .block_erasers = {}, /* set by probing function */ - .unlock = spi_disable_blockprotect, /* is this safe? */ - .write = NULL, /* set by probing function */ - .read = spi_chip_read, + .unlock = SPI_DISABLE_BLOCKPROTECT, /* is this safe? */ + .write = 0, /* set by probing function */ + .read = SPI_CHIP_READ, /* FIXME: some vendor extensions define this */ .voltage = {0}, }, @@ -19376,16 +21314,16 @@ const struct flashchip flashchips[] = { .page_size = 256, /* probe is assumed to work, rest will be filled in by probe */ .tested = TEST_OK_PROBE, - .probe = probe_opaque, + .probe = PROBE_OPAQUE, /* eraseblock sizes will be set by the probing function */ .block_erasers = { { - .block_erase = erase_opaque, + .block_erase = OPAQUE_ERASE, } }, - .write = write_opaque, - .read = read_opaque, + .write = WRITE_OPAQUE, + .read = READ_OPAQUE, }, { @@ -19397,10 +21335,10 @@ const struct flashchip flashchips[] = { .total_size = 0, .page_size = 256, .tested = TEST_BAD_PREW, - .probe = probe_spi_rdid4, + .probe = PROBE_SPI_RDID4, .probe_timing = TIMING_ZERO, - .write = NULL, - .read = NULL, + .write = 0, + .read = 0, }, { @@ -19412,10 +21350,10 @@ const struct flashchip flashchips[] = { .total_size = 0, .page_size = 256, .tested = TEST_BAD_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, - .write = NULL, - .read = NULL, + .write = 0, + .read = 0, }, { @@ -19427,10 +21365,10 @@ const struct flashchip flashchips[] = { .total_size = 0, .page_size = 256, .tested = TEST_BAD_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, - .write = NULL, - .read = NULL, + .write = 0, + .read = 0, }, { @@ -19442,10 +21380,10 @@ const struct flashchip flashchips[] = { .total_size = 0, .page_size = 256, .tested = TEST_BAD_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, - .write = NULL, - .read = NULL, + .write = 0, + .read = 0, }, { @@ -19457,10 +21395,10 @@ const struct flashchip flashchips[] = { .total_size = 0, .page_size = 256, .tested = TEST_BAD_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, - .write = NULL, - .read = NULL, + .write = 0, + .read = 0, }, { @@ -19472,10 +21410,10 @@ const struct flashchip flashchips[] = { .total_size = 0, .page_size = 256, .tested = TEST_BAD_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, - .write = NULL, - .read = NULL, + .write = 0, + .read = 0, }, { @@ -19487,10 +21425,10 @@ const struct flashchip flashchips[] = { .total_size = 0, .page_size = 256, .tested = TEST_BAD_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, - .write = NULL, - .read = NULL, + .write = 0, + .read = 0, }, { @@ -19502,10 +21440,10 @@ const struct flashchip flashchips[] = { .total_size = 0, .page_size = 256, .tested = TEST_BAD_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, - .write = NULL, - .read = NULL, + .write = 0, + .read = 0, }, { @@ -19517,32 +21455,10 @@ const struct flashchip flashchips[] = { .total_size = 0, .page_size = 256, .tested = TEST_BAD_PREW, - .probe = probe_spi_rdid, + .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, - .write = NULL, - .read = NULL, - }, - - { - .vendor = "Generic", - .name = "Variable Size SPI chip", - .bustype = BUS_SPI, - .manufacture_id = PROGMANUF_ID, - .model_id = PROGDEV_ID, - .total_size = 64, /* This size is set temporarily */ - .page_size = 256, - .feature_bits = FEATURE_4BA, - .tested = TEST_OK_PREW, - .probe = probe_variable_size, - .block_erasers = - { - { - .eraseblocks = { {64 * 1024, 1} }, - .block_erase = spi_block_erase_c7, - } - }, - .write = spi_chip_write_256, - .read = spi_chip_read, + .write = 0, + .read = 0, }, { @@ -19554,8 +21470,8 @@ const struct flashchip flashchips[] = { .total_size = 0, .page_size = 256, .tested = TEST_BAD_PREW, - .probe = probe_spi_rdid, - .write = NULL, + .probe = PROBE_SPI_RDID, + .write = 0, }, { @@ -19567,8 +21483,8 @@ const struct flashchip flashchips[] = { .total_size = 0, .page_size = 256, .tested = TEST_BAD_PREW, - .probe = probe_spi_rems, - .write = NULL, + .probe = PROBE_SPI_REMS, + .write = 0, }, {0} |