summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/spi-nor/spi-nor.c
diff options
context:
space:
mode:
authorBrian Norris2015-09-01 21:57:15 +0200
committerBrian Norris2015-10-14 03:22:56 +0200
commitc6fc2171b249e73745c497b578b417a2946f1b2f (patch)
treeceddd33a18a09ba8228c769cf2ba297de6ebaf72 /drivers/mtd/spi-nor/spi-nor.c
parentmtd: spi-nor: support lock/unlock/is_locked for Winbond (diff)
downloadkernel-qcow2-linux-c6fc2171b249e73745c497b578b417a2946f1b2f.tar.gz
kernel-qcow2-linux-c6fc2171b249e73745c497b578b417a2946f1b2f.tar.xz
kernel-qcow2-linux-c6fc2171b249e73745c497b578b417a2946f1b2f.zip
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@gmail.com>
Diffstat (limited to 'drivers/mtd/spi-nor/spi-nor.c')
-rw-r--r--drivers/mtd/spi-nor/spi-nor.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index 53099209500a..533a0f7da360 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);
}