mtd: spi-nor: support lock/unlock/is_locked for Winbond
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Nov 6 10:59:24 PST 2015
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=357ca38d47519c1b90eebfe58e188dd299ee2cef
Commit: 357ca38d47519c1b90eebfe58e188dd299ee2cef
Parent: 5bf0e69b67a5600ea7ef178acd57606d1fc2c134
Author: Brian Norris <computersforpeace at gmail.com>
AuthorDate: Tue Sep 1 12:57:14 2015 -0700
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue Oct 13 18:22:55 2015 -0700
mtd: spi-nor: support lock/unlock/is_locked for Winbond
Many other flash share the same features as ST Micro. I've tested some
Winbond flash, so add them.
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/spi-nor/spi-nor.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index 192aa8c..5309920 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -1215,8 +1215,9 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode)
mtd->_erase = spi_nor_erase;
mtd->_read = spi_nor_read;
- /* NOR protection support for STmicro/Micron chips */
- if (JEDEC_MFR(info) == SNOR_MFR_MICRON) {
+ /* NOR protection support for STmicro/Micron chips and similar */
+ if (JEDEC_MFR(info) == SNOR_MFR_MICRON ||
+ JEDEC_MFR(info) == SNOR_MFR_WINBOND) {
nor->flash_lock = stm_lock;
nor->flash_unlock = stm_unlock;
nor->flash_is_locked = stm_is_locked;
More information about the linux-mtd-cvs
mailing list