mtd: spi-nor: disable protection for Winbond flash at startup
authorBrian Norris <computersforpeace@gmail.com>
Tue, 1 Sep 2015 19:57:15 +0000 (12:57 -0700)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 14 Oct 2015 01:22:56 +0000 (18:22 -0700)
In case the flash was locked at boot time.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/spi-nor/spi-nor.c

index 5309920..533a0f7 100644 (file)
@@ -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);
        }