]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
microblaze: Change initialization sequence
authorMichal Simek <monstr@monstr.eu>
Fri, 16 Apr 2010 09:57:35 +0000 (11:57 +0200)
committerMichal Simek <monstr@monstr.eu>
Fri, 16 Apr 2010 10:15:56 +0000 (12:15 +0200)
env_relocation should be called first.
Added stdio_init too.

Signed-off-by: Michal Simek <monstr@monstr.eu>
arch/microblaze/lib/board.c

index 41a1db65183215495a06a744a6b42c5ecc9b539b..3ff5c17d244c6e04f2db06a11e50a3a3c8d4dc41 100644 (file)
@@ -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 ();