0055-kernel-disable-software-protection-bits-for-macronix-flash-chips-at-init.patch 938 B

12345678910111213141516171819202122
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Fri, 26 Feb 2016 04:24:06 +0100
  3. Subject: kernel: disable software protection bits for macronix flash chips at init
  4. Backport of r47626
  5. diff --git a/target/linux/generic/patches-3.18/465-m25p80-mx-disable-software-protection.patch b/target/linux/generic/patches-3.18/465-m25p80-mx-disable-software-protection.patch
  6. new file mode 100644
  7. index 0000000..d7d7eec
  8. --- /dev/null
  9. +++ b/target/linux/generic/patches-3.18/465-m25p80-mx-disable-software-protection.patch
  10. @@ -0,0 +1,10 @@
  11. +--- a/drivers/mtd/spi-nor/spi-nor.c
  12. ++++ b/drivers/mtd/spi-nor/spi-nor.c
  13. +@@ -962,6 +962,7 @@ int spi_nor_scan(struct spi_nor *nor, co
  14. +
  15. + if (JEDEC_MFR(info->jedec_id) == CFI_MFR_ATMEL ||
  16. + JEDEC_MFR(info->jedec_id) == CFI_MFR_INTEL ||
  17. ++ JEDEC_MFR(info->jedec_id) == CFI_MFR_MACRONIX ||
  18. + JEDEC_MFR(info->jedec_id) == CFI_MFR_SST) {
  19. + write_enable(nor);
  20. + write_sr(nor, 0);