1
0

466-Revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. This reverts commit 67b9bcd36906e12a15ffec19463afbbd6a41660e.
  6. The underlying issue breaking Spansion flash has been fixed with "mtd: spi-nor:
  7. wait until lock/unlock operations are ready" and "mtd: spi-nor: wait for SR_WIP
  8. to clear on initial unlock", so we can support unlocking for Winbond flash
  9. again.
  10. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
  11. ---
  12. drivers/mtd/spi-nor/spi-nor.c | 4 +++-
  13. 1 file changed, 3 insertions(+), 1 deletion(-)
  14. --- a/drivers/mtd/spi-nor/spi-nor.c
  15. +++ b/drivers/mtd/spi-nor/spi-nor.c
  16. @@ -2716,6 +2716,7 @@ int spi_nor_scan(struct spi_nor *nor, co
  17. JEDEC_MFR(info) == SNOR_MFR_INTEL ||
  18. JEDEC_MFR(info) == SNOR_MFR_MACRONIX ||
  19. JEDEC_MFR(info) == SNOR_MFR_SST ||
  20. + JEDEC_MFR(info) == SNOR_MFR_WINBOND ||
  21. info->flags & SPI_NOR_HAS_LOCK) {
  22. write_enable(nor);
  23. write_sr(nor, 0);
  24. @@ -2734,7 +2735,8 @@ int spi_nor_scan(struct spi_nor *nor, co
  25. /* NOR protection support for STmicro/Micron chips and similar */
  26. if (JEDEC_MFR(info) == SNOR_MFR_MICRON ||
  27. - info->flags & SPI_NOR_HAS_LOCK) {
  28. + JEDEC_MFR(info) == SNOR_MFR_WINBOND ||
  29. + info->flags & SPI_NOR_HAS_LOCK) {
  30. nor->flash_lock = stm_lock;
  31. nor->flash_unlock = stm_unlock;
  32. nor->flash_is_locked = stm_is_locked;