]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - common/board_r.c
SPARC: Remove
[people/ms/u-boot.git] / common / board_r.c
index d959ad3c6f90ea2c2a422b6878c11a5437764a2c..c8eeb9cbd4a5f7f1919988bd02f5714248311b4b 100644 (file)
@@ -49,9 +49,6 @@
 #include <timer.h>
 #include <trace.h>
 #include <watchdog.h>
-#ifdef CONFIG_CMD_AMBAPP
-#include <ambapp.h>
-#endif
 #ifdef CONFIG_ADDR_MAP
 #include <asm/mmu.h>
 #endif
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_SPARC)
-extern int prom_init(void);
-#endif
-
 ulong monitor_flash_len;
 
 __weak int board_flash_wp_on(void)
@@ -191,7 +184,7 @@ static int initr_serial(void)
        return 0;
 }
 
-#if defined(CONFIG_PPC) || defined(CONFIG_M68K)
+#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_MIPS)
 static int initr_trap(void)
 {
        /*
@@ -262,17 +255,6 @@ static int initr_pci(void)
 }
 #endif
 
-#ifdef CONFIG_WINBOND_83C553
-static int initr_w83c553f(void)
-{
-       /*
-        * Initialise the ISA bridge
-        */
-       initialise_w83c553f();
-       return 0;
-}
-#endif
-
 static int initr_barrier(void)
 {
 #ifdef CONFIG_PPC
@@ -366,7 +348,7 @@ static int initr_manual_reloc_cmdtable(void)
 }
 #endif
 
-#if !defined(CONFIG_SYS_NO_FLASH)
+#if defined(CONFIG_MTD_NOR_FLASH)
 static int initr_flash(void)
 {
        ulong flash_size = 0;
@@ -437,6 +419,7 @@ static int initr_nand(void)
 {
        puts("NAND:  ");
        nand_init();
+       printf("%lu MiB\n", nand_size() / 1024);
        return 0;
 }
 #endif
@@ -596,11 +579,11 @@ static int initr_kgdb(void)
 }
 #endif
 
-#if defined(CONFIG_STATUS_LED)
+#if defined(CONFIG_LED_STATUS)
 static int initr_status_led(void)
 {
-#if defined(STATUS_LED_BOOT)
-       status_led_set(STATUS_LED_BOOT, STATUS_LED_BLINKING);
+#if defined(CONFIG_LED_STATUS_BOOT)
+       status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_BLINKING);
 #else
        status_led_init();
 #endif
@@ -608,19 +591,7 @@ static int initr_status_led(void)
 }
 #endif
 
-#if defined(CONFIG_CMD_AMBAPP) && defined(CONFIG_SYS_AMBAPP_PRINT_ON_STARTUP)
-extern int do_ambapp_print(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-
-static int initr_ambapp_print(void)
-{
-       puts("AMBA:\n");
-       do_ambapp_print(NULL, 0, 0, NULL);
-
-       return 0;
-}
-#endif
-
-#if defined(CONFIG_SCSI)
+#if defined(CONFIG_SCSI) && !defined(CONFIG_DM_SCSI)
 static int initr_scsi(void)
 {
        puts("SCSI:  ");
@@ -630,15 +601,6 @@ static int initr_scsi(void)
 }
 #endif
 
-#if defined(CONFIG_CMD_DOC)
-static int initr_doc(void)
-{
-       puts("DOC:   ");
-       doc_init();
-       return 0;
-}
-#endif
-
 #ifdef CONFIG_BITBANGMII
 static int initr_bbmii(void)
 {
@@ -757,7 +719,7 @@ static int run_main_loop(void)
  *
  * TODO: perhaps reset the watchdog in the initcall function after each call?
  */
-init_fnc_t init_sequence_r[] = {
+static init_fnc_t init_sequence_r[] = {
        initr_trace,
        initr_reloc,
        /* TODO: could x86/PPC have this also perhaps? */
@@ -807,7 +769,7 @@ init_fnc_t init_sequence_r[] = {
 #ifdef CONFIG_NEEDS_MANUAL_RELOC
        initr_manual_reloc_cmdtable,
 #endif
-#if defined(CONFIG_PPC) || defined(CONFIG_M68K)
+#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_MIPS)
        initr_trap,
 #endif
 #ifdef CONFIG_ADDR_MAP
@@ -834,19 +796,15 @@ init_fnc_t init_sequence_r[] = {
         */
        initr_pci,
 #endif
-#ifdef CONFIG_WINBOND_83C553
-       initr_w83c553f,
-#endif
 #ifdef CONFIG_ARCH_EARLY_INIT_R
        arch_early_init_r,
 #endif
        power_init_board,
-#ifndef CONFIG_SYS_NO_FLASH
+#ifdef CONFIG_MTD_NOR_FLASH
        initr_flash,
 #endif
        INIT_FUNC_WATCHDOG_RESET
-#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_X86) || \
-       defined(CONFIG_SPARC)
+#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_X86)
        /* initialize higher level parts of CPU like time base and timers */
        cpu_init_r,
 #endif
@@ -907,7 +865,7 @@ init_fnc_t init_sequence_r[] = {
 #if defined(CONFIG_MICROBLAZE) || defined(CONFIG_AVR32) || defined(CONFIG_M68K)
        timer_init,             /* initialize timer */
 #endif
-#if defined(CONFIG_STATUS_LED)
+#if defined(CONFIG_LED_STATUS)
        initr_status_led,
 #endif
        /* PPC has a udelay(20) here dating from 2002. Why? */
@@ -917,20 +875,10 @@ init_fnc_t init_sequence_r[] = {
 #ifdef CONFIG_BOARD_LATE_INIT
        board_late_init,
 #endif
-#if defined(CONFIG_CMD_AMBAPP)
-       ambapp_init_reloc,
-#if defined(CONFIG_SYS_AMBAPP_PRINT_ON_STARTUP)
-       initr_ambapp_print,
-#endif
-#endif
-#ifdef CONFIG_SCSI
+#if defined(CONFIG_SCSI) && !defined(CONFIG_DM_SCSI)
        INIT_FUNC_WATCHDOG_RESET
        initr_scsi,
 #endif
-#ifdef CONFIG_CMD_DOC
-       INIT_FUNC_WATCHDOG_RESET
-       initr_doc,
-#endif
 #ifdef CONFIG_BITBANGMII
        initr_bbmii,
 #endif
@@ -965,15 +913,22 @@ init_fnc_t init_sequence_r[] = {
 #endif
 #ifdef CONFIG_PS2KBD
        initr_kbd,
-#endif
-#if defined(CONFIG_SPARC)
-       prom_init,
 #endif
        run_main_loop,
 };
 
 void board_init_r(gd_t *new_gd, ulong dest_addr)
 {
+       /*
+        * Set up the new global data pointer. So far only x86 does this
+        * here.
+        * TODO(sjg@chromium.org): Consider doing this for all archs, or
+        * dropping the new_gd parameter.
+        */
+#if CONFIG_IS_ENABLED(X86_64)
+       arch_setup_gd(new_gd);
+#endif
+
 #ifdef CONFIG_NEEDS_MANUAL_RELOC
        int i;
 #endif