diff options
author | Nikolai Artemiev <nartemiev@google.com> | 2021-10-20 22:32:25 +1100 |
---|---|---|
committer | Anastasia Klimchuk <aklm@chromium.org> | 2022-02-28 07:58:43 +0000 |
commit | b7ea3a9a5d481a09229abba0fe6d2509ef2713a1 (patch) | |
tree | 01b5923330cf9ccd39da4c1802bda05d45e937da /flashchips.c | |
parent | a0319804a03f69d6e21af2ce42e8fd311e2e6a8f (diff) | |
download | flashrom-b7ea3a9a5d481a09229abba0fe6d2509ef2713a1.tar.gz flashrom-b7ea3a9a5d481a09229abba0fe6d2509ef2713a1.tar.bz2 flashrom-b7ea3a9a5d481a09229abba0fe6d2509ef2713a1.zip |
spi25_statusreg,flashchips: add SR2 read/write support
This patch adds support for reading and writing the second status
register and enables it on a limited set of flash chips.
Chip support for RDSR2/WRSR2/extended WRSR is represented using feature
flags to be consistent with how other SPI capabilities are represented.
BUG=b:195381327,b:153800563
BRANCH=none
TEST=flashrom -{r,w,E}
TEST=flashrom --wp-{enable,disable,range,list,status} at end of patch series
TEST=logged SR2 read/write values during wp commands
Change-Id: I34a503b0958e8f2f22a2a993a6ea529eb46b41db
Signed-off-by: Nikolai Artemiev <nartemiev@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58570
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'flashchips.c')
-rw-r--r-- | flashchips.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/flashchips.c b/flashchips.c index 21eeb395..9e10b5d2 100644 --- a/flashchips.c +++ b/flashchips.c @@ -6317,7 +6317,7 @@ const struct flashchip flashchips[] = { .total_size = 16384, .page_size = 256, /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */ - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_WRSR_EXT, .tested = TEST_OK_PREW, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -6706,7 +6706,8 @@ const struct flashchip flashchips[] = { .model_id = GIGADEVICE_GD25Q256D, .total_size = 32768, .page_size = 256, - .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN | + FEATURE_WRSR_EXT | FEATURE_WRSR2, .tested = TEST_OK_PREW, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -6754,7 +6755,7 @@ 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, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_WRSR2, .tested = TEST_OK_PREW, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, |