1 From: Felix Fietkau <nbd@openwrt.org>
2 Date: Thu, 26 Nov 2015 17:03:46 +0100
3 Subject: [PATCH] Revert "mtd: spi-nor: disable protection for Winbond flash at
6 This reverts commit c6fc2171b249e73745c497b578b417a2946f1b2f.
8 This commit is breaking read access on at least s25fl064k, but also
9 possibly other Spansion flash chips.
11 Any mtd read seems to succeed, but simply returns a zero-filled buffer.
13 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
16 --- a/drivers/mtd/spi-nor/spi-nor.c
17 +++ b/drivers/mtd/spi-nor/spi-nor.c
18 @@ -1194,14 +1194,13 @@ int spi_nor_scan(struct spi_nor *nor, co
19 mutex_init(&nor->lock);
22 - * Atmel, SST, Intel/Numonyx, and others serial NOR tend to power up
23 - * with the software protection bits set
24 + * Atmel, SST and Intel/Numonyx serial nor tend to power
25 + * up with the software protection bits set
28 if (JEDEC_MFR(info) == SNOR_MFR_ATMEL ||
29 JEDEC_MFR(info) == SNOR_MFR_INTEL ||
30 - JEDEC_MFR(info) == SNOR_MFR_SST ||
31 - JEDEC_MFR(info) == SNOR_MFR_WINBOND) {
32 + JEDEC_MFR(info) == SNOR_MFR_SST) {