diff options
author | Simon Glass <sjg@chromium.org> | 2013-03-11 06:49:53 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-03-15 16:13:59 -0400 |
commit | 1938f4a5b62fc03c52b47697a89b2bb47b77c90c (patch) | |
tree | de3f0cdbd68d2f74dff99aa134ba080dd5891bdc /arch/x86/lib | |
parent | a6741bce507151f561250a00f28bcbfb2372ba02 (diff) |
Introduce generic pre-relocation board_f.c
This file handles common pre-relocation init for boards which use
the generic framework.
It starts up the console, DRAM, performs relocation and then jumps
to post-relocation init.
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Wolfgang Denk <wd@denx.de>
Acked-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r-- | arch/x86/lib/board.c | 2 | ||||
-rw-r--r-- | arch/x86/lib/init_helpers.c | 2 | ||||
-rw-r--r-- | arch/x86/lib/relocate.c | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c index 2441a66ae22..555301a24e3 100644 --- a/arch/x86/lib/board.c +++ b/arch/x86/lib/board.c @@ -219,7 +219,7 @@ static void do_init_loop(init_fnc_t **init_fnc_ptr) void board_init_f(ulong boot_flags) { - gd->fdt_blob = gd->arch.new_fdt = NULL; + gd->fdt_blob = gd->new_fdt = NULL; gd->flags = boot_flags; do_init_loop(init_sequence_f); diff --git a/arch/x86/lib/init_helpers.c b/arch/x86/lib/init_helpers.c index 414fdcc4c90..7df9536a478 100644 --- a/arch/x86/lib/init_helpers.c +++ b/arch/x86/lib/init_helpers.c @@ -111,7 +111,7 @@ int calculate_relocation_address(void) */ if (gd->fdt_blob) { dest_addr -= fdt_size; - gd->arch.new_fdt = (void *)dest_addr; + gd->new_fdt = (void *)dest_addr; dest_addr &= ~15; } #endif diff --git a/arch/x86/lib/relocate.c b/arch/x86/lib/relocate.c index 3e370f2906a..e893c2b214f 100644 --- a/arch/x86/lib/relocate.c +++ b/arch/x86/lib/relocate.c @@ -49,15 +49,15 @@ int copy_uboot_to_ram(void) int copy_fdt_to_ram(void) { - if (gd->arch.new_fdt) { + if (gd->new_fdt) { ulong fdt_size; fdt_size = ALIGN(fdt_totalsize(gd->fdt_blob) + 0x1000, 32); - memcpy(gd->arch.new_fdt, gd->fdt_blob, fdt_size); + memcpy(gd->new_fdt, gd->fdt_blob, fdt_size); debug("Relocated fdt from %p to %p, size %lx\n", - gd->fdt_blob, gd->arch.new_fdt, fdt_size); - gd->fdt_blob = gd->arch.new_fdt; + gd->fdt_blob, gd->new_fdt, fdt_size); + gd->fdt_blob = gd->new_fdt; } return 0; |