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/spi25_statusreg.c b/spi25_statusreg.c
index b363b5f..24bef6c 100644
--- a/spi25_statusreg.c
+++ b/spi25_statusreg.c
@@ -139,9 +139,11 @@
struct spi_command cmds[] = {
{
+ .io_mode = spi_current_io_mode(flash),
.opcode_len = JEDEC_WREN_OUTSIZE,
.writearr = &enable_cmd,
}, {
+ .io_mode = spi_current_io_mode(flash),
.opcode_len = 1,
.write_len = write_cmd_len - 1,
.writearr = write_cmd,