]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/board_f.c
common/board_f.c: fix condition for reloc_off assignment
[karo-tx-uboot.git] / common / board_f.c
index cfd77f865361b53feb3a2945ba6a589a1e62417b..c172ea1acb8a08be9f7adc92322d327793151205 100644 (file)
@@ -280,6 +280,11 @@ __weak int arch_cpu_init(void)
        return 0;
 }
 
+__weak unsigned long get_timer_masked(void)
+{
+       return get_timer(0);
+}
+
 #ifdef CONFIG_OF_HOSTFILE
 
 static int read_fdt_from_file(void)
@@ -734,7 +739,11 @@ static int reloc_fdt(void)
 static int setup_reloc(void)
 {
 #ifdef CONFIG_SYS_TEXT_BASE
+#ifndef CONFIG_ARM
        gd->reloc_off = gd->relocaddr - CONFIG_SYS_TEXT_BASE;
+#else
+       gd->reloc_off = gd->relocaddr - (unsigned long)__image_copy_start;
+#endif
 #endif
        memcpy(gd->new_gd, (char *)gd, sizeof(gd_t));
 
@@ -807,6 +816,12 @@ static int initf_dm(void)
        return 0;
 }
 
+/* Architecture-specific memory reservation */
+__weak int reserve_arch(void)
+{
+       return 0;
+}
+
 static init_fnc_t init_sequence_f[] = {
 #ifdef CONFIG_SANDBOX
        setup_ram_buf,
@@ -888,7 +903,7 @@ static init_fnc_t init_sequence_f[] = {
        prt_mpc5xxx_clks,
 #endif /* CONFIG_MPC5xxx */
 #if defined(CONFIG_DISPLAY_BOARDINFO)
-       checkboard,             /* display board info */
+       show_board_info,
 #endif
        INIT_FUNC_WATCHDOG_INIT
 #if defined(CONFIG_MISC_INIT_F)
@@ -970,6 +985,7 @@ static init_fnc_t init_sequence_f[] = {
        setup_machine,
        reserve_global_data,
        reserve_fdt,
+       reserve_arch,
        reserve_stacks,
        setup_dram_config,
        show_dram_config,
@@ -985,6 +1001,11 @@ static init_fnc_t init_sequence_f[] = {
        INIT_FUNC_WATCHDOG_RESET
        reloc_fdt,
        setup_reloc,
+#ifdef CONFIG_X86
+       copy_uboot_to_ram,
+       clear_bss,
+       do_elf_reloc_fixups,
+#endif
 #if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX)
        jump_to_copy,
 #endif
@@ -1044,9 +1065,6 @@ void board_init_f(ulong boot_flags)
  */
 static init_fnc_t init_sequence_f_r[] = {
        init_cache_f_r,
-       copy_uboot_to_ram,
-       clear_bss,
-       do_elf_reloc_fixups,
 
        NULL,
 };