1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- From: Matthias Schiffer <mschiffer@universe-factory.net>
- Date: Sat, 7 May 2016 00:29:06 +0200
- Subject: kernel: mtd: spi-nor: unlock Winbond flashs
- diff --git a/target/linux/generic/patches-3.18/463-Revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch b/target/linux/generic/patches-3.18/463-Revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch
- new file mode 100644
- index 0000000000000000000000000000000000000000..4682b7a77b160a0814012d26f0edf1a7bfaf5312
- --- /dev/null
- +++ b/target/linux/generic/patches-3.18/463-Revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch
- @@ -0,0 +1,46 @@
- +From 20bbd73b6b04677a73933830363ab3178adc2ce9 Mon Sep 17 00:00:00 2001
- +Message-Id: <20bbd73b6b04677a73933830363ab3178adc2ce9.1462573588.git.mschiffer@universe-factory.net>
- +From: Matthias Schiffer <mschiffer@universe-factory.net>
- +Date: Sat, 7 May 2016 00:26:23 +0200
- +Subject: [PATCH] Revert "mtd: spi-nor: fix Spansion regressions (aliased with
- + Winbond)"
- +
- +This reverts commit 67b9bcd36906e12a15ffec19463afbbd6a41660e.
- +---
- + drivers/mtd/spi-nor/spi-nor.c | 6 ++++--
- + include/linux/mtd/spi-nor.h | 2 +-
- + 2 files changed, 5 insertions(+), 3 deletions(-)
- +
- +--- a/drivers/mtd/spi-nor/spi-nor.c
- ++++ b/drivers/mtd/spi-nor/spi-nor.c
- +@@ -1165,7 +1165,8 @@ 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 ||
- ++ JEDEC_MFR(info) == SNOR_MFR_WINBOND) {
- + write_enable(nor);
- + write_sr(nor, 0);
- + spi_nor_wait_till_ready(nor);
- +@@ -1182,7 +1183,8 @@ int spi_nor_scan(struct spi_nor *nor, co
- + mtd->_read = spi_nor_read;
- +
- + /* NOR protection support for STmicro/Micron chips and similar */
- +- if (JEDEC_MFR(info) == SNOR_MFR_MICRON) {
- ++ if (JEDEC_MFR(info) == SNOR_MFR_MICRON ||
- ++ JEDEC_MFR(info) == SNOR_MFR_WINBOND) {
- + nor->flash_lock = stm_lock;
- + nor->flash_unlock = stm_unlock;
- + nor->flash_is_locked = stm_is_locked;
- +--- a/include/linux/mtd/spi-nor.h
- ++++ b/include/linux/mtd/spi-nor.h
- +@@ -25,7 +25,7 @@
- + #define SNOR_MFR_MACRONIX CFI_MFR_MACRONIX
- + #define SNOR_MFR_SPANSION CFI_MFR_AMD
- + #define SNOR_MFR_SST CFI_MFR_SST
- +-#define SNOR_MFR_WINBOND 0xef /* Also used by some Spansion */
- ++#define SNOR_MFR_WINBOND 0xef
- +
- + /*
- + * Note on opcode nomenclature: some opcodes have a format like
|