mtd: spi-nor: disable protection for Winbond flash at startup

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=c6fc2171b249e73745c497b578b417a2946f1b2f
Commit:     c6fc2171b249e73745c497b578b417a2946f1b2f
Parent:     357ca38d47519c1b90eebfe58e188dd299ee2cef
Author:     Brian Norris <computersforpeace at gmail.com>
AuthorDate: Tue Sep 1 12:57:15 2015 -0700
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue Oct 13 18:22:56 2015 -0700

    mtd: spi-nor: disable protection for Winbond flash at startup
    
    In case the flash was locked at boot time.
    
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/spi-nor/spi-nor.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index 5309920..533a0f7 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -1194,13 +1194,14 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode)
 	mutex_init(&nor->lock);
 
 	/*
-	 * Atmel, SST and Intel/Numonyx serial nor tend to power
-	 * up with the software protection bits set
+	 * Atmel, SST, Intel/Numonyx, and others serial NOR tend to power up
+	 * with the software protection bits set
 	 */
 
 	if (JEDEC_MFR(info) == SNOR_MFR_ATMEL ||
 	    JEDEC_MFR(info) == SNOR_MFR_INTEL ||
-	    JEDEC_MFR(info) == SNOR_MFR_SST) {
+	    JEDEC_MFR(info) == SNOR_MFR_SST ||
+	    JEDEC_MFR(info) == SNOR_MFR_WINBOND) {
 		write_enable(nor);
 		write_sr(nor, 0);
 	}



More information about the linux-mtd-cvs mailing list