summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeng Fan <Peng.Fan@freescale.com>2015-03-25 17:25:46 +0800
committerPeng Fan <Peng.Fan@freescale.com>2015-03-26 10:31:24 +0800
commit9b6ac1f82b09d243dc674c780abcacf0e12262c2 (patch)
treeee597ea4269535a4cb083cfee70ea9e1b34a1dcd /include
parent8a49e53c5b518677b46cada5df153306161f29ac (diff)
downloadu-boot-imx-9b6ac1f82b09d243dc674c780abcacf0e12262c2.zip
u-boot-imx-9b6ac1f82b09d243dc674c780abcacf0e12262c2.tar.gz
u-boot-imx-9b6ac1f82b09d243dc674c780abcacf0e12262c2.tar.bz2
MLK-10467 mtd:spi Add ATMEL AT45DB021E support
This patch is to add atmel AT45DB021E spi flash support. Since this flash is different from the spi flash that we previous use such as m25p32 and spanion spi nor flashes, pieces of code are added. 1. The default page size is 264 bytes, but the mtd/spi framework can not handle such page. So we need to configure the page size from 264 to 256 bytes. Page Size command seq “Power of 2” binary page size (256 bytes)| 3Dh 2Ah 80h A6h DataFlash page size (264 bytes) | 3Dh 2Ah 80h A7h And when probe the flash, configure the flash to 256 bytes page size, if the page size is already 256bytes, just return and do not configure it again. The page size configuration times is only about 10000, so to avoid configuring it each time. 2. Add the flash params in sf_params.c. 3. This flash support 2K block erase, add this flag. 4. The status command is 0xD7, different from others. It's polling status bit is Bit 7 -> 0 Device is busy with an internal operation. -> 1 Device is ready. This patch has been tested on mx7d 19x19 ddr3 arm2 board. And tested on mx7d 12x12 lpddr3 board. All works fine. Note: Since this flash is only 256KB, we can not test spi boot on mx7d 19x19 arm2 board. If want to test this flash, open CONFIG_SYS_USE_SPINOR. Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/spi_flash.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/spi_flash.h b/include/spi_flash.h
index 1a11286..f3efb2b 100644
--- a/include/spi_flash.h
+++ b/include/spi_flash.h
@@ -20,6 +20,7 @@
#include <linux/compiler.h>
/* sf param flags */
+#define SECT_2K (1 << 0)
#define SECT_4K 1 << 1
#define SECT_32K 1 << 2
#define E_FSR 1 << 3