From d6c831e0e5a0ef97eb054dd3eb382d66b1bffc40 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Tue, 20 Dec 2016 05:19:08 -0300 Subject: generic: mtd: backport SPI_NOR_HAS_LOCK This flag was added to 4.9 with upstream commit 76a4707de5e18dc32d9cb4e990686140c5664a15. Signed-off-by: Victor Shyba [refresh and adjust platform patches, fix commit message] Signed-off-by: Mathias Kresin --- .../patches-4.4/465-m25p80-mx-disable-software-protection.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'target/linux/generic/patches-4.4/465-m25p80-mx-disable-software-protection.patch') diff --git a/target/linux/generic/patches-4.4/465-m25p80-mx-disable-software-protection.patch b/target/linux/generic/patches-4.4/465-m25p80-mx-disable-software-protection.patch index 070f4c6023..89bafa8387 100644 --- a/target/linux/generic/patches-4.4/465-m25p80-mx-disable-software-protection.patch +++ b/target/linux/generic/patches-4.4/465-m25p80-mx-disable-software-protection.patch @@ -4,11 +4,11 @@ Signed-off-by: Felix Fietkau --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1158,6 +1158,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1159,6 +1159,7 @@ int spi_nor_scan(struct spi_nor *nor, co if (JEDEC_MFR(info) == SNOR_MFR_ATMEL || JEDEC_MFR(info) == SNOR_MFR_INTEL || + JEDEC_MFR(info) == SNOR_MFR_MACRONIX || - JEDEC_MFR(info) == SNOR_MFR_SST) { + JEDEC_MFR(info) == SNOR_MFR_SST || + info->flags & SPI_NOR_HAS_LOCK) { write_enable(nor); - write_sr(nor, 0); -- cgit v1.2.3