public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] MIPS: Add onenand_init() to board.c and move nand_init()
@ 2008-11-12 12:18 Stefan Roese
  2008-11-16  7:19 ` Shinya Kuribayashi
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Roese @ 2008-11-12 12:18 UTC (permalink / raw)
  To: u-boot

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>
---
 lib_mips/board.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/lib_mips/board.c b/lib_mips/board.c
index 01dda69..1ccdc4a 100644
--- a/lib_mips/board.c
+++ b/lib_mips/board.c
@@ -29,6 +29,7 @@
 #include <net.h>
 #include <environment.h>
 #include <nand.h>
+#include <onenand_uboot.h>
 #include <spi.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -387,6 +388,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();
 
@@ -428,11 +438,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 */
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] MIPS: Add onenand_init() to board.c and move nand_init()
  2008-11-12 12:18 [U-Boot] [PATCH] MIPS: Add onenand_init() to board.c and move nand_init() Stefan Roese
@ 2008-11-16  7:19 ` Shinya Kuribayashi
  0 siblings, 0 replies; 2+ messages in thread
From: Shinya Kuribayashi @ 2008-11-16  7:19 UTC (permalink / raw)
  To: u-boot

Stefan Roese wrote:
> 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.

Fair enough.  Thanks for your work.  Then, I've checked qemu-mips build
with GCC 4.2.3, and got no warns/errors.

> Signed-off-by: Stefan Roese <sr@denx.de>

Acked-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-16  7:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-12 12:18 [U-Boot] [PATCH] MIPS: Add onenand_init() to board.c and move nand_init() Stefan Roese
2008-11-16  7:19 ` Shinya Kuribayashi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox