]> git.sur5r.net Git - u-boot/commitdiff
sf: Add QUAD_IO_FAST read support
authorJagannadha Sutradharudu Teki <jaganna@xilinx.com>
Tue, 24 Dec 2013 09:54:31 +0000 (15:24 +0530)
committerJagannadha Sutradharudu Teki <jaganna@xilinx.com>
Sat, 11 Jan 2014 09:43:27 +0000 (15:13 +0530)
This patch adds support QUAD_IO_FAST read command.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
drivers/mtd/spi/sf_internal.h
drivers/mtd/spi/sf_probe.c
include/spi.h
include/spi_flash.h

index dca34f7a71585475f4280a609777c5ff07dc114f..7be02925c865e76935249d36aa104061499882a1 100644 (file)
@@ -45,6 +45,7 @@
 #define CMD_READ_DUAL_OUTPUT_FAST      0x3b
 #define CMD_READ_DUAL_IO_FAST          0xbb
 #define CMD_READ_QUAD_OUTPUT_FAST      0x6b
+#define CMD_READ_QUAD_IO_FAST          0xeb
 #define CMD_READ_ID                    0x9f
 
 /* Bank addr access commands */
index d95c8b9ae30b1dce91c9956a26f7122155489fd7..a049e729a18b6fc59e9d902d69229469def3fe2a 100644 (file)
@@ -25,6 +25,7 @@ static u8 spi_read_cmds_array[] = {
        CMD_READ_DUAL_OUTPUT_FAST,
        CMD_READ_DUAL_IO_FAST,
        CMD_READ_QUAD_OUTPUT_FAST,
+       CMD_READ_QUAD_IO_FAST,
 };
 
 static int spi_flash_set_qeb(struct spi_flash *flash, u8 idcode0)
@@ -131,6 +132,7 @@ static struct spi_flash *spi_flash_validate_params(struct spi_slave *spi,
 
        /* Set the quad enable bit - only for quad commands */
        if ((flash->read_cmd == CMD_READ_QUAD_OUTPUT_FAST) ||
+           (flash->read_cmd == CMD_READ_QUAD_IO_FAST) ||
            (flash->write_cmd == CMD_QUAD_PAGE_PROGRAM)) {
                if (spi_flash_set_qeb(flash, idcode[0])) {
                        debug("SF: Fail to set QEB for %02x\n", idcode[0]);
index 5dd490a66e203a00c7db5aff09e3c5ba200f7729..c8a9d87b5f9b0a2b9a9bcd126ffc48490830a725 100644 (file)
 #define SPI_OPM_RX_DOUT                1 << 1
 #define SPI_OPM_RX_DIO         1 << 2
 #define SPI_OPM_RX_QOF         1 << 3
+#define SPI_OPM_RX_QIOF                1 << 4
 #define SPI_OPM_RX_EXTN                SPI_OPM_RX_AS | SPI_OPM_RX_DOUT | \
-                               SPI_OPM_RX_DIO | SPI_OPM_RX_QOF
+                               SPI_OPM_RX_DIO | SPI_OPM_RX_QOF | \
+                               SPI_OPM_RX_QIOF
 
 /* Header byte that marks the start of the message */
 #define SPI_PREAMBLE_END_BYTE  0xec
index 8e0bb46e8124a31e65fee04780653c817c631048..99724a0d3ef35640bccde7fe8116d5781944ec3a 100644 (file)
@@ -28,9 +28,10 @@ enum spi_read_cmds {
        DUAL_OUTPUT_FAST = 1 << 1,
        DUAL_IO_FAST = 1 << 2,
        QUAD_OUTPUT_FAST = 1 << 3,
+       QUAD_IO_FAST = 1 << 4,
 };
 #define RD_EXTN                ARRAY_SLOW | DUAL_OUTPUT_FAST | DUAL_IO_FAST
-#define RD_FULL                RD_EXTN | QUAD_OUTPUT_FAST
+#define RD_FULL                RD_EXTN | QUAD_OUTPUT_FAST | QUAD_IO_FAST
 
 /**
  * struct spi_flash_params - SPI/QSPI flash device params structure