1
0
Fork 0

MLK-15052-4: mtd: spi-nor: fix the micron/st issue

Some MICRON related macros in spi-nor domain were ST, actually. We
need to add the REAL micron defination in header/source files for
mt35xu512aba Micron Octal Nor chip.

Signed-off-by: Han Xu <han.xu@nxp.com>
pull/10/head
Han Xu 2018-08-07 11:50:08 -05:00 committed by Jason Liu
parent 6fb7b9c6be
commit 5c56b1e2fc
3 changed files with 5 additions and 0 deletions

View File

@ -283,6 +283,7 @@ static inline int set_4byte(struct spi_nor *nor, const struct flash_info *info,
switch (JEDEC_MFR(info)) {
case SNOR_MFR_MICRON:
case SNOR_MFR_MICRONO:
/* Some Micron need WREN command; all will accept it */
need_wren = true;
case SNOR_MFR_MACRONIX:
@ -2454,6 +2455,7 @@ static int spi_nor_init_params(struct spi_nor *nor,
break;
case SNOR_MFR_MICRON:
case SNOR_MFR_MICRONO:
break;
default:
@ -2777,6 +2779,7 @@ int spi_nor_scan(struct spi_nor *nor, const char *name,
/* NOR protection support for STmicro/Micron chips and similar */
if (JEDEC_MFR(info) == SNOR_MFR_MICRON ||
JEDEC_MFR(info) == SNOR_MFR_MICRONO ||
info->flags & SPI_NOR_HAS_LOCK) {
nor->flash_lock = stm_lock;
nor->flash_unlock = stm_unlock;

View File

@ -377,6 +377,7 @@ struct cfi_fixup {
#define CFI_MFR_SHARP 0x00B0
#define CFI_MFR_SST 0x00BF
#define CFI_MFR_ST 0x0020 /* STMicroelectronics */
#define CFI_MFR_MICRON 0x002C
#define CFI_MFR_TOSHIBA 0x0098
#define CFI_MFR_WINBOND 0x00DA

View File

@ -24,6 +24,7 @@
#define SNOR_MFR_GIGADEVICE 0xc8
#define SNOR_MFR_INTEL CFI_MFR_INTEL
#define SNOR_MFR_MICRON CFI_MFR_ST /* ST Micro <--> Micron */
#define SNOR_MFR_MICRONO CFI_MFR_MICRON /* Original Micron */
#define SNOR_MFR_MACRONIX CFI_MFR_MACRONIX
#define SNOR_MFR_SPANSION CFI_MFR_AMD
#define SNOR_MFR_SST CFI_MFR_SST