kernel: disable software protection bits for macronix flash chips at init

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

Backport r47626

git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@48849 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
John Crispin
2016-03-01 08:14:49 +00:00
parent 8871ec8c28
commit 765d0e4a09

View File

@@ -0,0 +1,10 @@
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -962,6 +962,7 @@ int spi_nor_scan(struct spi_nor *nor, co
if (JEDEC_MFR(info->jedec_id) == CFI_MFR_ATMEL ||
JEDEC_MFR(info->jedec_id) == CFI_MFR_INTEL ||
+ JEDEC_MFR(info->jedec_id) == CFI_MFR_MACRONIX ||
JEDEC_MFR(info->jedec_id) == CFI_MFR_SST) {
write_enable(nor);
write_sr(nor, 0);