diff options
author | Alexey Brodkin | 2015-02-24 19:40:36 +0300 |
---|---|---|
committer | Alexey Brodkin | 2015-04-03 09:47:49 +0300 |
commit | 3fb8016360d5433f3c4da51f8dd57550e7ef9018 (patch) | |
tree | 1cc2fe2a4723565e60279386122a35abe44cb36a /common/board_f.c | |
parent | 8ee28251d95e237302c7c44929e59a813e147622 (diff) |
arc: clean-up init procedure
Intention behind this work was elimination of as much assembly-written
code as it is possible.
In case of ARC we already have relocation fix-up implemented in C so why
don't we use C for U-Boot copying, .bss zeroing etc.
It turned out x86 uses pretty similar approach so we re-used parts of
code in "board_f.c" initially implemented for x86.
Now assembly usage during init is limited to stack- and frame-pointer
setup before and after relocation.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/board_f.c')
-rw-r--r-- | common/board_f.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/board_f.c b/common/board_f.c index f7ffa54052b..cb956b853c5 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -47,7 +47,7 @@ #include <asm/errno.h> #include <asm/io.h> #include <asm/sections.h> -#ifdef CONFIG_X86 +#if defined(CONFIG_X86) || defined(CONFIG_ARC) #include <asm/init_helpers.h> #include <asm/relocate.h> #endif @@ -761,7 +761,7 @@ static int jump_to_copy(void) * similarly for all archs. When we do generic relocation, hopefully * we can make all archs enable the dcache prior to relocation. */ -#ifdef CONFIG_X86 +#if defined(CONFIG_X86) || defined(CONFIG_ARC) /* * SDRAM and console are now initialised. The final stack can now * be setup in SDRAM. Code execution will continue in Flash, but @@ -997,7 +997,7 @@ static init_fnc_t init_sequence_f[] = { INIT_FUNC_WATCHDOG_RESET reloc_fdt, setup_reloc, -#ifdef CONFIG_X86 +#if defined(CONFIG_X86) || defined(CONFIG_ARC) copy_uboot_to_ram, clear_bss, do_elf_reloc_fixups, @@ -1041,7 +1041,7 @@ void board_init_f(ulong boot_flags) #endif } -#ifdef CONFIG_X86 +#if defined(CONFIG_X86) || defined(CONFIG_ARC) /* * For now this code is only used on x86. * |