Signed-off-by: Magnus Lilja <[EMAIL PROTECTED]>
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

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to