070f4c6023d011994e4e8dff201be10537e1a95b
[openwrt/openwrt.git] / target / linux / generic / patches-4.4 / 465-m25p80-mx-disable-software-protection.patch
1 Disable software protection bits for Macronix flashes.
2
3 Signed-off-by: Felix Fietkau <nbd@nbd.name>
4
5 --- a/drivers/mtd/spi-nor/spi-nor.c
6 +++ b/drivers/mtd/spi-nor/spi-nor.c
7 @@ -1158,6 +1158,7 @@ int spi_nor_scan(struct spi_nor *nor, co
8
9 if (JEDEC_MFR(info) == SNOR_MFR_ATMEL ||
10 JEDEC_MFR(info) == SNOR_MFR_INTEL ||
11 + JEDEC_MFR(info) == SNOR_MFR_MACRONIX ||
12 JEDEC_MFR(info) == SNOR_MFR_SST) {
13 write_enable(nor);
14 write_sr(nor, 0);