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/include/flash.h b/include/flash.h
index f839995..fb64304 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -460,8 +460,9 @@
            of the extended address register. */
 	int address_high_byte;
 	bool in_4ba_mode;
+	bool in_qpi_mode;
 	/* For SPI flash chips, we dynamically select the fast-read operation. */
-	const struct spi_read_op *spi_fast_read;
+	struct spi_read_op *spi_fast_read;
 
 	int chip_restore_fn_count;
 	struct chip_restore_func_data {