sf: Add MICRON manufacturer id
authorAshish Kumar <Ashish.Kumar@nxp.com>
Tue, 25 Sep 2018 08:41:33 +0000 (14:11 +0530)
committerJagan Teki <jagan@amarulasolutions.com>
Fri, 12 Oct 2018 06:07:49 +0000 (11:37 +0530)
NOR flash name MT35X_QLKA and MT25Q_** used on NXP board has
manufacturer id as 0x2C, which are rather for newer flashes
after the split of Micron from ST.

So macro for this micron manufacturer id.

Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com>
Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
[jagan: updated commit message]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/mtd/spi/sf_internal.h
drivers/mtd/spi/spi_flash.c

index 4f63cacc642a72067f02c52cc0170b9e4ef6596e..26f5c7c995e511d677a9709dd983f0107bdff582 100644 (file)
@@ -32,6 +32,7 @@ enum spi_nor_option_flags {
 /* CFI Manufacture ID's */
 #define SPI_FLASH_CFI_MFR_SPANSION     0x01
 #define SPI_FLASH_CFI_MFR_STMICRO      0x20
+#define SPI_FLASH_CFI_MFR_MICRON       0x2C
 #define SPI_FLASH_CFI_MFR_MACRONIX     0xc2
 #define SPI_FLASH_CFI_MFR_SST          0xbf
 #define SPI_FLASH_CFI_MFR_WINBOND      0xef
index c1591242591da8da4fd33d9f67dbfad6f754760b..c73011748eda4d81f7bf422d183f2e4604b22910 100644 (file)
@@ -1096,6 +1096,7 @@ static int set_quad_mode(struct spi_flash *flash,
 #endif
 #ifdef CONFIG_SPI_FLASH_STMICRO
        case SPI_FLASH_CFI_MFR_STMICRO:
+       case SPI_FLASH_CFI_MFR_MICRON:
                debug("SF: QEB is volatile for %02x flash\n", JEDEC_MFR(info));
                return 0;
 #endif
@@ -1183,6 +1184,7 @@ int spi_flash_scan(struct spi_flash *flash)
 #if defined(CONFIG_SPI_FLASH_STMICRO) || defined(CONFIG_SPI_FLASH_SST)
        /* NOR protection support for STmicro/Micron chips and similar */
        if (JEDEC_MFR(info) == SPI_FLASH_CFI_MFR_STMICRO ||
+           JEDEC_MFR(info) == SPI_FLASH_CFI_MFR_MICRON ||
            JEDEC_MFR(info) == SPI_FLASH_CFI_MFR_SST) {
                flash->flash_lock = stm_lock;
                flash->flash_unlock = stm_unlock;