]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - common/board_r.c
flash: complete CONFIG_SYS_NO_FLASH move with renaming
[people/ms/u-boot.git] / common / board_r.c
index ad02549311ea84f64c377601de81aa6d3cd636e1..5c9e6987b9e1a64f4b9fc43e53cd6bf06166860a 100644 (file)
@@ -191,7 +191,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 +262,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 +355,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;
@@ -596,11 +585,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
@@ -620,7 +609,7 @@ static int initr_ambapp_print(void)
 }
 #endif
 
-#if defined(CONFIG_CMD_SCSI)
+#if defined(CONFIG_SCSI) && !defined(CONFIG_DM_SCSI)
 static int initr_scsi(void)
 {
        puts("SCSI:  ");
@@ -630,15 +619,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 +737,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 +787,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,14 +814,11 @@ 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
@@ -907,7 +884,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? */
@@ -923,14 +900,10 @@ init_fnc_t init_sequence_r[] = {
        initr_ambapp_print,
 #endif
 #endif
-#ifdef CONFIG_CMD_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
@@ -974,6 +947,16 @@ init_fnc_t init_sequence_r[] = {
 
 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