Skip to content

Commit 357ca38

Browse files
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>
1 parent 5bf0e69 commit 357ca38

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎drivers/mtd/spi-nor/spi-nor.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,8 +1215,9 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode)
12151215
mtd->_erase = spi_nor_erase;
12161216
mtd->_read = spi_nor_read;
12171217

1218-
/* NOR protection support for STmicro/Micron chips */
1219-
if (JEDEC_MFR(info) == SNOR_MFR_MICRON) {
1218+
/* NOR protection support for STmicro/Micron chips and similar */
1219+
if (JEDEC_MFR(info) == SNOR_MFR_MICRON ||
1220+
JEDEC_MFR(info) == SNOR_MFR_WINBOND) {
12201221
nor->flash_lock = stm_lock;
12211222
nor->flash_unlock = stm_unlock;
12221223
nor->flash_is_locked = stm_is_locked;

0 commit comments

Comments
 (0)