]> 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 48fa4ee52406df7a5fe874b14366c8d81fb67379..5c9e6987b9e1a64f4b9fc43e53cd6bf06166860a 100644 (file)
@@ -355,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;
@@ -737,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? */
@@ -818,7 +818,7 @@ init_fnc_t init_sequence_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
@@ -947,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