465-m25p80-mx-disable-software-protection.patch 457 B

1234567891011121314
  1. Disable software protection bits for Macronix flashes.
  2. Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  3. --- a/drivers/mtd/spi-nor/spi-nor.c
  4. +++ b/drivers/mtd/spi-nor/spi-nor.c
  5. @@ -1156,6 +1156,7 @@ int spi_nor_scan(struct spi_nor *nor, co
  6. if (JEDEC_MFR(info) == SNOR_MFR_ATMEL ||
  7. JEDEC_MFR(info) == SNOR_MFR_INTEL ||
  8. + JEDEC_MFR(info) == SNOR_MFR_MACRONIX ||
  9. JEDEC_MFR(info) == SNOR_MFR_SST) {
  10. write_enable(nor);
  11. write_sr(nor, 0);