| b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | From: Matthias Schiffer <mschiffer@universe-factory.net> |
| 2 | Date: Tue, 9 Jan 2018 20:41:48 +0100 |
| 3 | Subject: [PATCH] Revert "mtd: spi-nor: fix Spansion regressions (aliased with |
| 4 | Winbond)" |
| 5 | |
| 6 | This reverts commit 67b9bcd36906e12a15ffec19463afbbd6a41660e. |
| 7 | |
| 8 | The underlying issue breaking Spansion flash has been fixed with "mtd: spi-nor: |
| 9 | wait until lock/unlock operations are ready" and "mtd: spi-nor: wait for SR_WIP |
| 10 | to clear on initial unlock", so we can support unlocking for Winbond flash |
| 11 | again. |
| 12 | |
| 13 | Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> |
| 14 | --- |
| 15 | drivers/mtd/spi-nor/spi-nor.c | 4 +++- |
| 16 | 1 file changed, 3 insertions(+), 1 deletion(-) |
| 17 | |
| 18 | --- a/drivers/mtd/spi-nor/spi-nor.c |
| 19 | +++ b/drivers/mtd/spi-nor/spi-nor.c |
| 20 | @@ -4400,6 +4400,7 @@ static void st_micron_set_default_init(s |
| 21 | |
| 22 | static void winbond_set_default_init(struct spi_nor *nor) |
| 23 | { |
| 24 | + nor->flags |= SNOR_F_HAS_LOCK; |
| 25 | nor->params.set_4byte = winbond_set_4byte; |
| 26 | } |
| 27 | |
| 28 | @@ -4888,6 +4889,7 @@ int spi_nor_scan(struct spi_nor *nor, co |
| 29 | JEDEC_MFR(nor->info) == SNOR_MFR_INTEL || |
| 30 | JEDEC_MFR(nor->info) == SNOR_MFR_MACRONIX || |
| 31 | JEDEC_MFR(nor->info) == SNOR_MFR_SST || |
| 32 | + JEDEC_MFR(nor->info) == SNOR_MFR_WINBOND || |
| 33 | nor->info->flags & SPI_NOR_HAS_LOCK) |
| 34 | nor->clear_sr_bp = spi_nor_clear_sr_bp; |
| 35 | |