Patchwork [U-Boot,RESEND,v2,10/20] sf: probe: Add support for AT45DB* flash parts

login
register
mail settings
Submitter Jagannadha Sutradharudu Teki
Date Aug. 6, 2013, 4:17 p.m.
Message ID <2f078fb8-fa02-43c9-ad85-1e508a1fa568@CO1EHSMHS031.ehs.local>
Download mbox | patch
Permalink /patch/265137/
State Superseded
Delegated to: Jagannadha Sutradharudu Teki
Headers show

Comments

Jagannadha Sutradharudu Teki - Aug. 6, 2013, 4:17 p.m.
Added AT45DB* parts are which are avilable in spi_flash_probe_legacy.c.

Updated the sector_size attributes as per the flash parts.
Looks fine for with this sector_size for computing the size
of flash.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
---
Changes for v2:
	- Enable CONFIG_SPI_FLASH_ATMEL

 drivers/mtd/spi/spi_flash_probe.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Patch

diff --git a/drivers/mtd/spi/spi_flash_probe.c b/drivers/mtd/spi/spi_flash_probe.c
index 34e7ca1..948fcdb 100644
--- a/drivers/mtd/spi/spi_flash_probe.c
+++ b/drivers/mtd/spi/spi_flash_probe.c
@@ -36,6 +36,15 @@  struct spi_flash_params {
 };
 
 static const struct spi_flash_params spi_flash_params_table[] = {
+#ifdef CONFIG_SPI_FLASH_ATMEL		/* ATMEL */
+	{"AT45DB011D",		0x1f2200, 0x0,	   64 * 1024,	   4},
+	{"AT45DB021D",		0x1f2300, 0x0,	   64 * 1024,	   8},
+	{"AT45DB041D",		0x1f2400, 0x0,	   64 * 1024,	   8},
+	{"AT45DB081D",		0x1f2500, 0x0,	   64 * 1024,	  16},
+	{"AT45DB161D",		0x1f2600, 0x0,	   64 * 1024,	  32},
+	{"AT45DB321D",		0x1f2700, 0x0,	   64 * 1024,	  64},
+	{"AT45DB641D",		0x1f2800, 0x0,	   64 * 1024,	 128},
+#endif
 #ifdef CONFIG_SPI_FLASH_EON		/* EON */
 	{"EN25Q32B",		0x1c3016, 0x0,	   64 * 1024,	  64},
 	{"EN25Q128B",		0x1c3018, 0x0,     64 * 1024,	 256},
@@ -135,7 +144,6 @@  static const struct spi_flash_params spi_flash_params_table[] = {
 	 */
 	/*
 	 * TODO:
-	 * ATMEL
 	 * RAMTRON
 	 */
 };