[U-Boot] [PATCH 6/8] microblaze: Change initialization sequence

monstr at monstr.eu monstr at monstr.eu
Fri Apr 16 12:09:02 CEST 2010


From: Michal Simek <monstr at monstr.eu>

env_relocation should be called first.
Added stdio_init too.

Signed-off-by: Michal Simek <monstr at monstr.eu>
---
 arch/microblaze/lib/board.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c
index 41a1db6..6c03297 100644
--- a/arch/microblaze/lib/board.c
+++ b/arch/microblaze/lib/board.c
@@ -30,6 +30,7 @@
 #include <timestamp.h>
 #include <version.h>
 #include <watchdog.h>
+#include <stdio_dev.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -151,15 +152,22 @@ void board_init (void)
 	}
 #endif
 
+	/* relocate environment function pointers etc. */
+	env_relocate ();
+
+	/* Initialize stdio devices */
+	stdio_init ();
+
+	if ((s = getenv ("loadaddr")) != NULL) {
+		load_addr = simple_strtoul (s, NULL, 16);
+	}
+
 #if defined(CONFIG_CMD_NET)
 	/* IP Address */
 	bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
 	eth_init (bd);
 #endif
 
-	/* relocate environment function pointers etc. */
-	env_relocate ();
-
 	/* main_loop */
 	for (;;) {
 		WATCHDOG_RESET ();
-- 
1.5.5.1



More information about the U-Boot mailing list