Add support for reading data or images from ISSI QSPI flash.

Signed-off-by: Naresh Kumar Ravulapalli <nareshkumar.ravulapa...@altera.com>
---
 drivers/mtd/spi/spi-nor-tiny.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/spi/spi-nor-tiny.c b/drivers/mtd/spi/spi-nor-tiny.c
index 23de64a1520..82c04d9810c 100644
--- a/drivers/mtd/spi/spi-nor-tiny.c
+++ b/drivers/mtd/spi/spi-nor-tiny.c
@@ -220,6 +220,7 @@ static inline int set_4byte(struct spi_nor *nor, const 
struct flash_info *info,
                /* Some Micron need WREN command; all will accept it */
                need_wren = true;
                fallthrough;
+       case SNOR_MFR_ISSI:
        case SNOR_MFR_MACRONIX:
        case SNOR_MFR_WINBOND:
                if (need_wren)
@@ -433,7 +434,7 @@ static int spi_nor_write_tiny(struct mtd_info *mtd, loff_t 
to, size_t len,
        return -ENOTSUPP;
 }
 
-#ifdef CONFIG_SPI_FLASH_MACRONIX
+#if defined(CONFIG_SPI_FLASH_MACRONIX) || defined(CONFIG_SPI_FLASH_ISSI)
 /**
  * macronix_quad_enable() - set QE bit in Status Register.
  * @nor:       pointer to a 'struct spi_nor'
@@ -662,8 +663,9 @@ static int spi_nor_setup(struct spi_nor *nor, const struct 
flash_info *info,
        /* Enable Quad I/O if needed. */
        if (spi_nor_get_protocol_width(nor->read_proto) == 4) {
                switch (JEDEC_MFR(info)) {
-#ifdef CONFIG_SPI_FLASH_MACRONIX
+#if defined(CONFIG_SPI_FLASH_MACRONIX) || defined(CONFIG_SPI_FLASH_ISSI)
                case SNOR_MFR_MACRONIX:
+               case SNOR_MFR_ISSI:
                        err = macronix_quad_enable(nor);
                        break;
 #endif
-- 
2.35.3

Reply via email to