From: Alexey Brodkin Date: Tue, 24 Mar 2015 08:12:47 +0000 (+0300) Subject: common/board_f: move board_init_f_mem() from #else CONFIG_X86 X-Git-Tag: v2015.04-rc5~19 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5bcd19aa299bf6832e943e3531400c1499f2c04d;p=oweals%2Fu-boot.git common/board_f: move board_init_f_mem() from #else CONFIG_X86 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 Cc: Simon Glass Cc: Tom Rini --- diff --git a/common/board_f.c b/common/board_f.c index 55ede07537..e537cd1ff8 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -1080,7 +1080,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 */ @@ -1098,4 +1100,4 @@ ulong board_init_f_mem(ulong top) return top; } -#endif /* CONFIG_X86 */ +#endif /* !CONFIG_X86 */