]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
common/board_f: move board_init_f_mem() from #else CONFIG_X86
authorAlexey Brodkin <Alexey.Brodkin@synopsys.com>
Tue, 24 Mar 2015 08:12:47 +0000 (11:12 +0300)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 12:35:12 +0000 (14:35 +0200)
Purpose of this change is to make it possible to re-use code currently
used on X86 solely for other architectures. For example:
 * init_sequence_f_r
 * board_init_f_r

Even though board_init_f_mem() has nothing to do with any particular
architecture it won't work (at least in current implementation) for X86.

This is because on X86 "gd" is an alias to function get_fs_gd_ptr(),
thus we cannot assign anything to it.

So this change separates selection of board_init_f_mem() from X86 while
keeping it disabled for X86 still.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
common/board_f.c

index 156fb0935595a13d603bb20834a33e2613d2a838..2ad38f055b60e9510c41bc301dca964818f723b2 100644 (file)
@@ -1087,7 +1087,9 @@ void board_init_f_r(void)
        /* 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 */
@@ -1105,4 +1107,4 @@ ulong board_init_f_mem(ulong top)
 
        return top;
 }
-#endif /* CONFIG_X86 */
+#endif /* !CONFIG_X86 */