Skip to content

Commit

Permalink
mtd: spi-nor: support lock/unlock/is_locked for Winbond
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Brian Norris committed Oct 14, 2015
1 parent 5bf0e69 commit 357ca38
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/mtd/spi-nor/spi-nor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 357ca38

Please sign in to comment.