[U-Boot] [PATCH 2/4] sf: Add bank addr access support macronix flash's
Jagannadha Sutradharudu Teki
jagannadha.sutradharudu-teki at xilinx.com
Mon Jul 29 20:08:35 CEST 2013
This patch adds bank addr access support for macronix flash's
so-that the macronix flashes which has > 16Mbyte sizes can be
accessible in 3-byte addressing mode.
Signed-off-by: Jagannadha Sutradharudu Teki <jaganna at xilinx.com>
---
drivers/mtd/spi/spi_flash.c | 1 +
drivers/mtd/spi/spi_flash_internal.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index 9814395..2528ebc 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -371,6 +371,7 @@ int spi_flash_bank_config(struct spi_flash *flash, u8 idcode0)
break;
case SPI_FLASH_STMICRO_IDCODE0:
case SPI_FLASH_WINBOND_IDCODE0:
+ case SPI_FLASH_MACRONIX_IDCODE0:
flash->bank_read_cmd = CMD_EXTNADDR_RDEAR;
flash->bank_write_cmd = CMD_EXTNADDR_WREAR;
break;
diff --git a/drivers/mtd/spi/spi_flash_internal.h b/drivers/mtd/spi/spi_flash_internal.h
index 20eed7c..30b2749 100644
--- a/drivers/mtd/spi/spi_flash_internal.h
+++ b/drivers/mtd/spi/spi_flash_internal.h
@@ -36,6 +36,7 @@
# define SPI_FLASH_SPANSION_IDCODE0 0x01
# define SPI_FLASH_STMICRO_IDCODE0 0x20
# define SPI_FLASH_WINBOND_IDCODE0 0xef
+# define SPI_FLASH_MACRONIX_IDCODE0 0xc2
/* Bank addr access commands */
# define CMD_BANKADDR_BRWR 0x17
--
1.8.3
More information about the U-Boot
mailing list