[U-Boot] [PATCH v5 18/18] sf_probe: Extend the SPI NOR protection for SST flashes
Fabio Estevam
festevam at gmail.com
Tue Nov 3 00:38:46 CET 2015
From: Fabio Estevam <fabio.estevam at freescale.com>
SST flashes have a similar SPI NOR protection scheme as STMICRO, so
add support for it.
Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
Changes since v4:
- None. Newly introduced in this version
drivers/mtd/spi/sf_internal.h | 1 +
drivers/mtd/spi/sf_probe.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h
index db46aa8..214ceaa 100644
--- a/drivers/mtd/spi/sf_internal.h
+++ b/drivers/mtd/spi/sf_internal.h
@@ -63,6 +63,7 @@ enum spi_nor_option_flags {
/* CFI Manufacture ID's */
#define SPI_FLASH_CFI_MFR_SPANSION 0x01
#define SPI_FLASH_CFI_MFR_STMICRO 0x20
+#define SPI_FLASH_CFI_MFR_SST 0xbf
#define SPI_FLASH_CFI_MFR_MACRONIX 0xc2
#define SPI_FLASH_CFI_MFR_WINBOND 0xef
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c
index 3626433..8a736c4 100644
--- a/drivers/mtd/spi/sf_probe.c
+++ b/drivers/mtd/spi/sf_probe.c
@@ -140,7 +140,8 @@ int static is_stm(struct spi_slave *spi, struct spi_flash *flash)
if (ret < 0)
return ret;
- if (idcode[0] == SPI_FLASH_CFI_MFR_STMICRO)
+ if (idcode[0] == SPI_FLASH_CFI_MFR_STMICRO ||
+ idcode[0] == SPI_FLASH_CFI_MFR_SST)
return 1;
else
return 0;
--
1.9.1
More information about the U-Boot
mailing list