aboutsummaryrefslogtreecommitdiff
path: root/arch/microblaze/lib
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2010-04-16 11:57:35 +0200
committerMichal Simek <monstr@monstr.eu>2010-04-16 12:15:56 +0200
commit9769b73f60fc0fb8de7ab16ff6300eae56505020 (patch)
treea8efc005e02e19c1f6176406f286719bf080810b /arch/microblaze/lib
parente6177b36b87d0ce627651e407b91245f16e5382e (diff)
downloadu-boot-linaro-stable-9769b73f60fc0fb8de7ab16ff6300eae56505020.tar.gz
microblaze: Change initialization sequence
env_relocation should be called first. Added stdio_init too. Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/lib')
-rw-r--r--arch/microblaze/lib/board.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c
index 41a1db651..3ff5c17d2 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;
@@ -88,6 +89,7 @@ void board_init (void)
bd_t *bd;
init_fnc_t **init_fnc_ptr;
gd = (gd_t *) CONFIG_SYS_GBL_DATA_OFFSET;
+ char *s;
#if defined(CONFIG_CMD_FLASH)
ulong flash_size = 0;
#endif
@@ -151,15 +153,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 ();