scsi: Remove completely unused functions
[platform/kernel/u-boot.git] / common / board_f.c
index a1138b0..4b74835 100644 (file)
 #include <trace.h>
 #include <video.h>
 #include <watchdog.h>
-#include <asm/errno.h>
+#include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/sections.h>
 #if defined(CONFIG_X86) || defined(CONFIG_ARC)
 #include <asm/init_helpers.h>
+#endif
+#if defined(CONFIG_X86) || defined(CONFIG_ARC) || defined(CONFIG_XTENSA)
 #include <asm/relocate.h>
 #endif
 #ifdef CONFIG_SANDBOX
@@ -117,10 +119,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;
@@ -270,7 +273,8 @@ static int setup_mon_len(void)
        gd->mon_len = (ulong)&__bss_end - (ulong)_start;
 #elif defined(CONFIG_SANDBOX) || defined(CONFIG_EFI_APP)
        gd->mon_len = (ulong)&_end - (ulong)_init;
-#elif defined(CONFIG_BLACKFIN) || defined(CONFIG_NIOS2)
+#elif defined(CONFIG_BLACKFIN) || defined(CONFIG_NIOS2) || \
+       defined(CONFIG_XTENSA)
        gd->mon_len = CONFIG_SYS_MONITOR_LEN;
 #elif defined(CONFIG_NDS32)
        gd->mon_len = (ulong)(&__bss_end) - (ulong)(&_start);
@@ -286,6 +290,11 @@ __weak int arch_cpu_init(void)
        return 0;
 }
 
+__weak int mach_cpu_init(void)
+{
+       return 0;
+}
+
 #ifdef CONFIG_SANDBOX
 static int setup_ram_buf(void)
 {
@@ -856,6 +865,7 @@ static init_fnc_t init_sequence_f[] = {
        x86_fsp_init,
 #endif
        arch_cpu_init,          /* basic arch cpu dependent setup */
+       mach_cpu_init,          /* SoC/machine dependent CPU setup */
        initf_dm,
        arch_cpu_init_dm,
        mark_bootstage,         /* need timer, go after init dm */
@@ -902,9 +912,6 @@ static init_fnc_t init_sequence_f[] = {
 #ifdef CONFIG_SANDBOX
        sandbox_early_getopt_check,
 #endif
-#ifdef CONFIG_OF_CONTROL
-       fdtdec_prepare_fdt,
-#endif
        display_options,        /* say that we are here */
        display_text_info,      /* show debugging info if required */
 #if defined(CONFIG_MPC8260)
@@ -970,7 +977,7 @@ static init_fnc_t init_sequence_f[] = {
         *  - board info struct
         */
        setup_dest_addr,
-#if defined(CONFIG_BLACKFIN)
+#if defined(CONFIG_BLACKFIN) || defined(CONFIG_XTENSA)
        /* Blackfin u-boot monitor should be on top of the ram */
        reserve_uboot,
 #endif
@@ -1002,7 +1009,7 @@ static init_fnc_t init_sequence_f[] = {
 # endif
 #endif /* CONFIG_DM_VIDEO */
        reserve_trace,
-#if !defined(CONFIG_BLACKFIN)
+#if !defined(CONFIG_BLACKFIN) && !defined(CONFIG_XTENSA)
        reserve_uboot,
 #endif
 #ifndef CONFIG_SPL_BUILD
@@ -1035,6 +1042,9 @@ static init_fnc_t init_sequence_f[] = {
        clear_bss,
        do_elf_reloc_fixups,
 #endif
+#if defined(CONFIG_XTENSA)
+       clear_bss,
+#endif
 #if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX)
        jump_to_copy,
 #endif
@@ -1045,7 +1055,7 @@ void board_init_f(ulong boot_flags)
 {
 #ifdef CONFIG_SYS_GENERIC_GLOBAL_DATA
        /*
-        * For some archtectures, global data is initialized and used before
+        * For some architectures, global data is initialized and used before
         * calling this function. The data should be preserved. For others,
         * CONFIG_SYS_GENERIC_GLOBAL_DATA should be defined and use the stack
         * here to host global data until relocation.
@@ -1057,7 +1067,7 @@ void board_init_f(ulong boot_flags)
        /*
         * Clear global data before it is accessed at debug print
         * in initcall_run_list. Otherwise the debug print probably
-        * get the wrong vaule of gd->have_console.
+        * get the wrong value of gd->have_console.
         */
        zero_global_data();
 #endif