Skip to content
Snippets Groups Projects
Commit 9d23fc58 authored by Stefan Roese's avatar Stefan Roese Committed by Shinya Kuribayashi
Browse files

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: default avatarStefan Roese <sr@denx.de>
Signed-off-by: default avatarShinya Kuribayashi <skuribay@ruby.dti.ne.jp>
parent 2145188b
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <net.h> #include <net.h>
#include <environment.h> #include <environment.h>
#include <nand.h> #include <nand.h>
#include <onenand_uboot.h>
#include <spi.h> #include <spi.h>
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
...@@ -378,6 +379,15 @@ void board_init_r (gd_t *id, ulong dest_addr) ...@@ -378,6 +379,15 @@ void board_init_r (gd_t *id, ulong dest_addr)
mem_malloc_init(); mem_malloc_init();
malloc_bin_reloc(); 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. */ /* relocate environment function pointers etc. */
env_relocate(); env_relocate();
...@@ -419,11 +429,6 @@ void board_init_r (gd_t *id, ulong dest_addr) ...@@ -419,11 +429,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
} }
#endif #endif
#ifdef CONFIG_CMD_NAND
puts ("NAND: ");
nand_init (); /* go init the NAND */
#endif
#ifdef CONFIG_CMD_SPI #ifdef CONFIG_CMD_SPI
puts ("SPI: "); puts ("SPI: ");
spi_init (); /* go init the SPI */ spi_init (); /* go init the SPI */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment