]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/board_f.c
common/board_f: add missing #endif after merge
[karo-tx-uboot.git] / common / board_f.c
index d8c12a0f83670c3ac5a35f7d1bc45c13956bc803..2ee398b93ec6895845b0b53958f6036d040dd495 100644 (file)
@@ -47,7 +47,7 @@
 #include <asm/errno.h>
 #include <asm/io.h>
 #include <asm/sections.h>
-#ifdef CONFIG_X86
+#if defined(CONFIG_X86) || defined(CONFIG_ARC)
 #include <asm/init_helpers.h>
 #include <asm/relocate.h>
 #endif
@@ -111,7 +111,8 @@ 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_SH) || defined(CONFIG_AT91SAM9_WATCHDOG) || \
+       defined(CONFIG_IMX_WATCHDOG))
        hw_watchdog_init();
 # endif
        puts("       Watchdog enabled\n");
@@ -498,7 +499,7 @@ static int reserve_trace(void)
 
 #if defined(CONFIG_VIDEO) && (!defined(CONFIG_PPC) || defined(CONFIG_8xx)) && \
                !defined(CONFIG_ARM) && !defined(CONFIG_X86) && \
-               !defined(CONFIG_BLACKFIN)
+               !defined(CONFIG_BLACKFIN) && !defined(CONFIG_M68K)
 static int reserve_video(void)
 {
        /* reserve memory for video display (always full pages) */
@@ -665,6 +666,14 @@ static int setup_board_part2(void)
        bd->bi_ipbfreq = gd->arch.ipb_clk;
        bd->bi_pcifreq = gd->pci_clk;
 #endif /* CONFIG_MPC5xxx */
+#if defined(CONFIG_M68K) && defined(CONFIG_PCI)
+       bd->bi_pcifreq = gd->pci_clk;
+#endif
+#if defined(CONFIG_EXTRA_CLOCK)
+       bd->bi_inpfreq = gd->arch.inp_clk;      /* input Freq in Hz */
+       bd->bi_vcofreq = gd->arch.vco_clk;      /* vco Freq in Hz */
+       bd->bi_flbfreq = gd->arch.flb_clk;      /* flexbus Freq in Hz */
+#endif
 
        return 0;
 }
@@ -735,6 +744,7 @@ static int setup_reloc(void)
        gd->reloc_off = gd->relocaddr - (unsigned long)__image_copy_start;
 #else
        gd->reloc_off = gd->relocaddr - CONFIG_SYS_TEXT_BASE;
+#endif
 #endif
        memcpy(gd->new_gd, (char *)gd, sizeof(gd_t));
 
@@ -759,7 +769,7 @@ static int jump_to_copy(void)
         * similarly for all archs. When we do generic relocation, hopefully
         * we can make all archs enable the dcache prior to relocation.
         */
-#ifdef CONFIG_X86
+#if defined(CONFIG_X86) || defined(CONFIG_ARC)
        /*
         * SDRAM and console are now initialised. The final stack can now
         * be setup in SDRAM. Code execution will continue in Flash, but
@@ -966,7 +976,7 @@ static init_fnc_t init_sequence_f[] = {
        /* TODO: Why the dependency on CONFIG_8xx? */
 #if defined(CONFIG_VIDEO) && (!defined(CONFIG_PPC) || defined(CONFIG_8xx)) && \
                !defined(CONFIG_ARM) && !defined(CONFIG_X86) && \
-               !defined(CONFIG_BLACKFIN)
+               !defined(CONFIG_BLACKFIN) && !defined(CONFIG_M68K)
        reserve_video,
 #endif
 #if !defined(CONFIG_BLACKFIN) && !defined(CONFIG_NIOS2)
@@ -995,7 +1005,7 @@ static init_fnc_t init_sequence_f[] = {
        INIT_FUNC_WATCHDOG_RESET
        reloc_fdt,
        setup_reloc,
-#ifdef CONFIG_X86
+#if defined(CONFIG_X86) || defined(CONFIG_ARC)
        copy_uboot_to_ram,
        clear_bss,
        do_elf_reloc_fixups,
@@ -1039,7 +1049,7 @@ void board_init_f(ulong boot_flags)
 #endif
 }
 
-#ifdef CONFIG_X86
+#if defined(CONFIG_X86) || defined(CONFIG_ARC)
 /*
  * For now this code is only used on x86.
  *
@@ -1073,12 +1083,14 @@ void board_init_f_r(void)
         * Transfer execution from Flash to RAM by calculating the address
         * of the in-RAM copy of board_init_r() and calling it
         */
-       (board_init_r + gd->reloc_off)(gd, gd->relocaddr);
+       (board_init_r + gd->reloc_off)((gd_t *)gd, gd->relocaddr);
 
        /* NOTREACHED - board_init_r() does not return */
        hang();
 }
-#else
+#endif /* CONFIG_X86 */
+
+#ifndef CONFIG_X86
 ulong board_init_f_mem(ulong top)
 {
        /* Leave space for the stack we are running with now */
@@ -1096,4 +1108,4 @@ ulong board_init_f_mem(ulong top)
 
        return top;
 }
-#endif /* CONFIG_X86 */
+#endif /* !CONFIG_X86 */