summaryrefslogtreecommitdiff
path: root/lib_mips
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2008-11-12 13:18:19 +0100
committerShinya Kuribayashi <skuribay@ruby.dti.ne.jp>2008-12-10 23:28:05 +0900
commit9d23fc584c4b7b8bb9ecbee48920b1b04b08fa1b (patch)
tree35f0d3b0b319611b81f466705b2c946083b44857 /lib_mips
parent2145188bea2df8f2b47a87ec3071b55027e8d0ae (diff)
downloadu-boot-imx-9d23fc584c4b7b8bb9ecbee48920b1b04b08fa1b.zip
u-boot-imx-9d23fc584c4b7b8bb9ecbee48920b1b04b08fa1b.tar.gz
u-boot-imx-9d23fc584c4b7b8bb9ecbee48920b1b04b08fa1b.tar.bz2
MIPS: Add onenand_init() to board.c and move nand_init()
This patch adds a call to onenand_init() for OneNAND support and moves the nand_init() call to an earlier place, so that the environment can be used from NAND and OneNAND. Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
Diffstat (limited to 'lib_mips')
-rw-r--r--lib_mips/board.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib_mips/board.c b/lib_mips/board.c
index 9c997f1..5133b8a 100644
--- a/lib_mips/board.c
+++ b/lib_mips/board.c
@@ -30,6 +30,7 @@
#include <net.h>
#include <environment.h>
#include <nand.h>
+#include <onenand_uboot.h>
#include <spi.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -378,6 +379,15 @@ void board_init_r (gd_t *id, ulong dest_addr)
mem_malloc_init();
malloc_bin_reloc();
+#ifdef CONFIG_CMD_NAND
+ puts ("NAND: ");
+ nand_init (); /* go init the NAND */
+#endif
+
+#if defined(CONFIG_CMD_ONENAND)
+ onenand_init();
+#endif
+
/* relocate environment function pointers etc. */
env_relocate();
@@ -419,11 +429,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
}
#endif
-#ifdef CONFIG_CMD_NAND
- puts ("NAND: ");
- nand_init (); /* go init the NAND */
-#endif
-
#ifdef CONFIG_CMD_SPI
puts ("SPI: ");
spi_init (); /* go init the SPI */