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>
#include <net.h>
#include <environment.h>
#include <nand.h>
+#include <onenand_uboot.h>
#include <spi.h>
DECLARE_GLOBAL_DATA_PTR;
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();
}
#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 */