[U-Boot] [PATCH 1/3][v2] sf: Add support of 1-2-2, 1-4-4 IO READ protocols
Prabhakar Kushwaha
prabhakar.kushwaha at nxp.com
Thu Dec 21 12:12:55 UTC 2017
IO READ protocols transfers both address and data on multiple
data bits. 1-2-2(DUAL IO), 1-4-4(QUAD IO) transfer address on 2
data bits or 4 bits per rising edge of SCK respectively.
This patch update spi_nor_flash_parameter->spi_nor_read_command
array based on DUAL or QUAD IO flag enabled in flash_info for a flash.
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha at nxp.com>
---
Changes for v2: none
drivers/mtd/spi/spi_flash.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index 51e28bf..4ff8d8b 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -1071,8 +1071,12 @@ int spi_flash_scan(struct spi_flash *flash)
flash->read_cmd = CMD_READ_ARRAY_FAST;
if (spi->mode & SPI_RX_SLOW)
flash->read_cmd = CMD_READ_ARRAY_SLOW;
+ else if (spi->mode & SPI_RX_QUAD && info->flags & RD_QUADIO)
+ flash->read_cmd = CMD_READ_QUAD_IO_FAST;
else if (spi->mode & SPI_RX_QUAD && info->flags & RD_QUAD)
flash->read_cmd = CMD_READ_QUAD_OUTPUT_FAST;
+ else if (spi->mode & SPI_RX_DUAL && info->flags & RD_DUALIO)
+ flash->read_cmd = CMD_READ_DUAL_IO_FAST;
else if (spi->mode & SPI_RX_DUAL && info->flags & RD_DUAL)
flash->read_cmd = CMD_READ_DUAL_OUTPUT_FAST;
--
2.7.4
More information about the U-Boot
mailing list