Implement QPI support
With the quad-i/o support in place, this is actually straight-
forward:
* we check for compatibility of the flash chip and programmer,
* select an appropriate fast-read function, and
* always set the respective io-mode when passing a SPI command
to the programmer.
Tested with FT4222H + W25Q128FV and linux_gpio_spi + MX25L25645G.
Change-Id: I2287034f6818f24f892d66d1a505cb719838f75d
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/165
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/dediprog.c b/dediprog.c
index 43d8b84..6b72938 100644
--- a/dediprog.c
+++ b/dediprog.c
@@ -646,7 +646,7 @@
msg_pdbg("Slow read for partial block from 0x%x, length 0x%x\n", start, len);
/* Override fast-read function for a moment: */
- const struct spi_read_op *const backup = flash->spi_fast_read;
+ struct spi_read_op *const backup = flash->spi_fast_read;
flash->spi_fast_read = NULL;
const int ret = default_spi_read(flash, buf, start, len);