[U-Boot] [PATCH] sf: probe: Add support to set Quad enable bit for ISSI
Siva Durga Prasad Paladugu
siva.durga.paladugu at xilinx.com
Mon Sep 14 08:30:08 CEST 2015
Added support to set the quad enable bit in status register
for ISSI parts. Tis would be same as for Macronix parts.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur at xilinx.com>
---
- This patch is based on u-boot-spi/master
---
drivers/mtd/spi/sf_internal.h | 1 +
drivers/mtd/spi/sf_probe.c | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h
index 9c95d56..a995d9b 100644
--- a/drivers/mtd/spi/sf_internal.h
+++ b/drivers/mtd/spi/sf_internal.h
@@ -60,6 +60,7 @@ enum {
#define SPI_FLASH_CFI_MFR_STMICRO 0x20
#define SPI_FLASH_CFI_MFR_MACRONIX 0xc2
#define SPI_FLASH_CFI_MFR_WINBOND 0xef
+#define SPI_FLASH_CFI_MFR_ISSI 0x9d
/* Erase commands */
#define CMD_ERASE_4K 0x20
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c
index 954376d..b4f8a33 100644
--- a/drivers/mtd/spi/sf_probe.c
+++ b/drivers/mtd/spi/sf_probe.c
@@ -32,7 +32,7 @@ static u8 spi_read_cmds_array[] = {
CMD_READ_QUAD_IO_FAST,
};
-#ifdef CONFIG_SPI_FLASH_MACRONIX
+#if defined(CONFIG_SPI_FLASH_MACRONIX) || defined(CONFIG_SPI_FLASH_ISSI)
static int spi_flash_set_qeb_mxic(struct spi_flash *flash)
{
u8 qeb_status;
@@ -79,8 +79,9 @@ static int spi_flash_set_qeb_winspan(struct spi_flash *flash)
static int spi_flash_set_qeb(struct spi_flash *flash, u8 idcode0)
{
switch (idcode0) {
-#ifdef CONFIG_SPI_FLASH_MACRONIX
+#if defined(CONFIG_SPI_FLASH_MACRONIX) || defined(CONFIG_SPI_FLASH_ISSI)
case SPI_FLASH_CFI_MFR_MACRONIX:
+ case SPI_FLASH_CFI_MFR_ISSI:
return spi_flash_set_qeb_mxic(flash);
#endif
#if defined(CONFIG_SPI_FLASH_SPANSION) || defined(CONFIG_SPI_FLASH_WINBOND)
--
1.7.1
More information about the U-Boot
mailing list