Nico Huber has uploaded this change for review. ( https://review.coreboot.org/25125
Change subject: [NOTFORMERGE] WRDI before RDID for AAI chips. ......................................................................
[NOTFORMERGE] WRDI before RDID for AAI chips.
Signed-off-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at
--- This is not for merge but just a reminder to not forget about this: AAI uses a stateful process for writes that will only reset on reception of WRDI or reset. In this state the chip will not react to other opcodes than AAI write and WRDI. Now when a chip gets interrupted while in this state, flashrom is not able to detect and use the chip, because it won't reply to the probes.
TODO: either add WRDI to the generic RDID command after checking that this is safe, or add the probe_spi_rdid_wrdi command instead of probe_spi_rdid to all AAI-capable chips. Thanks to Denis 'GNUtoo' Carikli for reporting the problem.
Change-Id: I197bafd64b96604afc8b1355a1a24e58f291536e --- M chipdrivers.h M flashchips.c M spi25.c 3 files changed, 8 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/25/25125/1
diff --git a/chipdrivers.h b/chipdrivers.h index f0223ae..909cdda 100644 --- a/chipdrivers.h +++ b/chipdrivers.h @@ -34,6 +34,7 @@
/* spi25.c */ int probe_spi_rdid(struct flashctx *flash); +int probe_spi_rdid_wrdi(struct flashctx *flash); int probe_spi_rdid4(struct flashctx *flash); int probe_spi_rems(struct flashctx *flash); int probe_spi_res1(struct flashctx *flash); diff --git a/flashchips.c b/flashchips.c index 1c28cb5..4bc494d 100644 --- a/flashchips.c +++ b/flashchips.c @@ -7037,7 +7037,7 @@ .page_size = 256, .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PREW, - .probe = probe_spi_rdid, + .probe = probe_spi_rdid_wrdi, .probe_timing = TIMING_ZERO, .block_erasers = { diff --git a/spi25.c b/spi25.c index 911dc4e..84f3db9 100644 --- a/spi25.c +++ b/spi25.c @@ -167,6 +167,12 @@ return probe_spi_rdid_generic(flash, 3); }
+int probe_spi_rdid_wrdi(struct flashctx *flash) +{ + spi_write_disable(flash); + return probe_spi_rdid_generic(flash, 3); +} + int probe_spi_rdid4(struct flashctx *flash) { /* Some SPI controllers do not support commands with writecnt=1 and