]> git.sur5r.net Git - u-boot/blobdiff - common/board_f.c
Merge branch 'master' of git://www.denx.de/git/u-boot-imx
[u-boot] / common / board_f.c
index a960144b02f362434fe5985f22e6b56da16e5a91..d405b5b407e817677afcea7f626c44c2c9c16d23 100644 (file)
@@ -45,6 +45,7 @@
 #include <post.h>
 #include <spi.h>
 #include <status_led.h>
+#include <timer.h>
 #include <trace.h>
 #include <video.h>
 #include <watchdog.h>
@@ -273,7 +274,7 @@ static int setup_mon_len(void)
        gd->mon_len = CONFIG_SYS_MONITOR_LEN;
 #elif defined(CONFIG_NDS32)
        gd->mon_len = (ulong)(&__bss_end) - (ulong)(&_start);
-#else
+#elif defined(CONFIG_SYS_MONITOR_BASE)
        /* TODO: use (ulong)&__bss_end - (ulong)&__text_start; ? */
        gd->mon_len = (ulong)&__bss_end - CONFIG_SYS_MONITOR_BASE;
 #endif
@@ -805,6 +806,11 @@ static int initf_dm(void)
        if (ret)
                return ret;
 #endif
+#ifdef CONFIG_TIMER_EARLY
+       ret = dm_timer_init();
+       if (ret)
+               return ret;
+#endif
 
        return 0;
 }
@@ -1089,6 +1095,13 @@ void board_init_f_r(void)
        if (initcall_run_list(init_sequence_f_r))
                hang();
 
+       /*
+        * The pre-relocation drivers may be using memory that has now gone
+        * away. Mark serial as unavailable - this will fall back to the debug
+        * UART if available.
+        */
+       gd->flags &= ~GD_FLG_SERIAL_READY;
+
        /*
         * U-Boot has been copied into SDRAM, the BSS has been cleared etc.
         * Transfer execution from Flash to RAM by calculating the address