x86: Switch to using generic global_data setup

There is quite a bit of assembler code that can be removed if we use the
generic global_data setup. Less arch-specific code makes it easier to add
new features and maintain the start-up code.

Drop the unneeded code and adjust the hooks in board_f.c to cope.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
Simon Glass
2015-08-10 20:44:32 -06:00
parent 2db9374561
commit f0c7d9c746
3 changed files with 18 additions and 84 deletions

View File

@@ -715,6 +715,7 @@ static int jump_to_copy(void)
* with the stack in SDRAM and Global Data in temporary memory
* (CPU cache)
*/
arch_setup_gd(gd->new_gd);
board_init_f_r_trampoline(gd->start_addr_sp);
#else
relocate_code(gd->start_addr_sp, gd->new_gd, gd->relocaddr);
@@ -1033,6 +1034,7 @@ __weak void arch_setup_gd(struct global_data *gd_ptr)
{
gd = gd_ptr;
}
#endif /* !CONFIG_X86 */
ulong board_init_f_mem(ulong top)
{
@@ -1054,4 +1056,3 @@ ulong board_init_f_mem(ulong top)
return top;
}
#endif /* !CONFIG_X86 */