diff options
author | Brian Norris <computersforpeace@gmail.com> | 2015-09-01 21:57:14 +0200 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-10-14 03:22:55 +0200 |
commit | 357ca38d47519c1b90eebfe58e188dd299ee2cef (patch) | |
tree | 18bcf51509f3ff4abeaf9b5334ae8c9a5d2e87ff /drivers/mtd/spi-nor | |
parent | mtd: spi-nor: add mtd_is_locked() support (diff) | |
download | linux-357ca38d47519c1b90eebfe58e188dd299ee2cef.tar.xz linux-357ca38d47519c1b90eebfe58e188dd299ee2cef.zip |
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@gmail.com>
Diffstat (limited to 'drivers/mtd/spi-nor')
-rw-r--r-- | drivers/mtd/spi-nor/spi-nor.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 192aa8c1c8bf..53099209500a 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; |