kernel: disable software protection bits for macronix flash chips at init
authorJohn Crispin <blogic@openwrt.org>
Tue, 1 Mar 2016 08:14:49 +0000 (08:14 +0000)
committerJohn Crispin <blogic@openwrt.org>
Tue, 1 Mar 2016 08:14:49 +0000 (08:14 +0000)
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

target/linux/generic/patches-3.18/462-m25p80-mx-disable-software-protection.patch [new file with mode: 0644]

diff --git a/target/linux/generic/patches-3.18/462-m25p80-mx-disable-software-protection.patch b/target/linux/generic/patches-3.18/462-m25p80-mx-disable-software-protection.patch
new file mode 100644 (file)
index 0000000..d7d7eec
--- /dev/null
@@ -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);