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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user