1 From e892dea7229d56b75c46a76b9039f9e179584a91 Mon Sep 17 00:00:00 2001
2 From: Yunhui Cui <B56489@freescale.com>
3 Date: Mon, 1 Feb 2016 18:48:49 +0800
4 Subject: [PATCH 100/113] mtd:spi_nor: Disable Micron flash HW protection
6 For Micron family ,The status register write enable/disable bit,
7 provides hardware data protection for the device.
8 When the enable/disable bit is set to 1, the status register
9 nonvolatile bits become read-only and the WRITE STATUS REGISTER
10 operation will not execute.
12 Signed-off-by: Yunhui Cui <B56489@freescale.com>
14 drivers/mtd/spi-nor/spi-nor.c | 9 +++++++++
15 1 file changed, 9 insertions(+)
17 --- a/drivers/mtd/spi-nor/spi-nor.c
18 +++ b/drivers/mtd/spi-nor/spi-nor.c
21 #define SPI_NOR_MAX_ID_LEN 6
22 #define SPI_NOR_MAX_ADDR_WIDTH 4
23 +#define SPI_NOR_MICRON_WRITE_ENABLE 0x7f
27 @@ -1246,6 +1247,14 @@ int spi_nor_scan(struct spi_nor *nor, co
31 + if (JEDEC_MFR(info) == SNOR_MFR_MICRON) {
33 + ret &= SPI_NOR_MICRON_WRITE_ENABLE;
40 mtd->name = dev_name(dev);