[U-Boot] [PATCH v3 6/6] i.MX31: Enable NAND driver for i.MX31 PDK board.
Magnus Lilja
lilja.magnus at gmail.com
Fri Aug 29 10:36:22 CEST 2008
Signed-off-by: Magnus Lilja <lilja.magnus at gmail.com>
The U-Boot environment is placed in NAND.
---
include/configs/mx31pdk.h | 26 ++++++++++++++++++++++++--
1 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h
index 6df1a00..b511e36 100644
--- a/include/configs/mx31pdk.h
+++ b/include/configs/mx31pdk.h
@@ -38,6 +38,8 @@
#define CONFIG_MX31_HCLK_FREQ 26000000
#define CONFIG_MX31_CLK32 32768
+#define CONFIG_MX31_NAND 1
+
#define CONFIG_DISPLAY_CPUINFO
#define CONFIG_DISPLAY_BOARDINFO
@@ -52,8 +54,9 @@
/*
* Size of malloc() pool
+ * An extra 128kbyte is needed for the NAND Bad Block table.
*/
-#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128 * 1024)
+#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128 * 1024 + 128 * 1024)
#define CFG_GBL_DATA_SIZE 128 /* bytes reserved for initial data */
/*
@@ -92,6 +95,8 @@
#define CONFIG_CMD_SPI
#define CONFIG_CMD_DATE
+#define CONFIG_CMD_NAND
+
/* Disabled due to compilation errors in cmd_bootm.c (IMLS seems to require
* that CFG_NO_FLASH is undefined).
*/
@@ -151,9 +156,26 @@
/* No NOR flash present */
#define CFG_NO_FLASH 1
-#define CFG_ENV_IS_NOWHERE 1
+/*
+ * NAND flash
+ */
+
+#define NAND_MAX_CHIPS 1
+#define CFG_MAX_NAND_DEVICE 1
+#define CFG_NAND_BASE 0x40000000
+/*
+ * Place U-boot environment right after the U-boot code.
+ */
+#define CFG_ENV_IS_IN_NAND 1
+#define CFG_ENV_OFFSET 0x40000
+/* CFG_ENV_SIZE has to be a multiple of the NAND block size */
#define CFG_ENV_SIZE (128 * 1024)
+/*
+ * JFFS2 partitions
+ */
+#define CONFIG_JFFS2_DEV "nand0"
+
#endif /* __CONFIG_H */
--
1.5.2.4
More information about the U-Boot
mailing list