]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - common/board_f.c
i2c: tegra: add standardized clk/reset API support
[karo-tx-uboot.git] / common / board_f.c
index 622093a3915af1326d30bc4de5022f19b1582961..c4501affd9da3b8a8e978ada308ceef4d335a5c5 100644 (file)
@@ -117,10 +117,11 @@ static int init_func_watchdog_init(void)
 # if defined(CONFIG_HW_WATCHDOG) && (defined(CONFIG_BLACKFIN) || \
        defined(CONFIG_M68K) || defined(CONFIG_MICROBLAZE) || \
        defined(CONFIG_SH) || defined(CONFIG_AT91SAM9_WATCHDOG) || \
+       defined(CONFIG_DESIGNWARE_WATCHDOG) || \
        defined(CONFIG_IMX_WATCHDOG))
        hw_watchdog_init();
-# endif
        puts("       Watchdog enabled\n");
+# endif
        WATCHDOG_RESET();
 
        return 0;
@@ -274,7 +275,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
@@ -339,7 +340,7 @@ static int setup_dest_addr(void)
         * Record secure memory location. Need recalcuate if memory splits
         * into banks, or the ram base is not zero.
         */
-       gd->secure_ram = gd->ram_size;
+       gd->arch.secure_ram = gd->ram_size;
 #endif
        /*
         * Subtract specified amount of memory to hide so that it won't
@@ -432,6 +433,15 @@ static int reserve_mmu(void)
        gd->arch.tlb_addr = gd->relocaddr;
        debug("TLB table from %08lx to %08lx\n", gd->arch.tlb_addr,
              gd->arch.tlb_addr + gd->arch.tlb_size);
+
+#ifdef CONFIG_SYS_MEM_RESERVE_SECURE
+       /*
+        * Record allocated tlb_addr in case gd->tlb_addr to be overwritten
+        * with location within secure ram.
+        */
+       gd->arch.tlb_allocated = gd->arch.tlb_addr;
+#endif
+
        return 0;
 }
 #endif
@@ -1095,6 +1105,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