From: Fabio Estevam <festevam@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 18/18] sf_probe: Extend the SPI NOR protection for SST flashes
Date: Mon, 2 Nov 2015 21:38:46 -0200 [thread overview]
Message-ID: <1446507526-7789-18-git-send-email-festevam@gmail.com> (raw)
In-Reply-To: <1446507526-7789-1-git-send-email-festevam@gmail.com>
From: Fabio Estevam <fabio.estevam@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@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
prev parent reply other threads:[~2015-11-02 23:38 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-02 23:38 [U-Boot] [PATCH v5 01/18] include: Add log2 header from the kernel Fabio Estevam
2015-11-02 23:38 ` [U-Boot] [PATCH v5 02/18] include: Add generic bitops headers Fabio Estevam
2015-11-02 23:38 ` [U-Boot] [PATCH v5 03/18] ARM: bitops: Use the " Fabio Estevam
2015-11-02 23:38 ` [U-Boot] [PATCH v5 04/18] x86: " Fabio Estevam
2015-11-02 23:38 ` [U-Boot] [PATCH v5 05/18] m68k: " Fabio Estevam
2015-11-02 23:38 ` [U-Boot] [PATCH v5 06/18] blackfin: " Fabio Estevam
2015-11-02 23:38 ` [U-Boot] [PATCH v5 07/18] sh: " Fabio Estevam
2015-11-02 23:38 ` [U-Boot] [PATCH v5 08/18] microblaze: " Fabio Estevam
2015-11-02 23:38 ` [U-Boot] [PATCH v5 09/18] sandbox: " Fabio Estevam
2015-11-02 23:38 ` [U-Boot] [PATCH v5 10/18] sparc: " Fabio Estevam
2015-11-02 23:38 ` [U-Boot] [PATCH v5 11/18] openrisc: " Fabio Estevam
2015-11-02 23:38 ` [U-Boot] [PATCH v5 12/18] nds32: " Fabio Estevam
2015-11-02 23:38 ` [U-Boot] [PATCH v5 13/18] nios2: " Fabio Estevam
2015-11-02 23:38 ` [U-Boot] [PATCH v5 14/18] compat: Remove is_power_of_2() definition Fabio Estevam
2015-11-02 23:38 ` [U-Boot] [PATCH v5 15/18] powerpc: Remove __ilog2_u64 and ffs4 from bitops Fabio Estevam
2015-11-03 0:00 ` York Sun
2015-11-02 23:38 ` [U-Boot] [PATCH v5 16/18] spi: sf_ops: Add SPI protection mechanism from the kernel Fabio Estevam
2015-11-02 23:38 ` [U-Boot] [PATCH v5 17/18] spi: Add SPI NOR protection mechanism Fabio Estevam
2015-11-03 14:51 ` Jagan Teki
2015-11-03 14:59 ` Fabio Estevam
2015-11-03 15:11 ` Jagan Teki
2015-11-03 15:17 ` Fabio Estevam
2015-11-03 15:20 ` Tom Rini
2015-11-03 15:27 ` Fabio Estevam
2015-11-02 23:38 ` Fabio Estevam [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446507526-7789-18-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox