diff options
author | Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> | 2018-03-23 15:35:03 +0300 |
---|---|---|
committer | Alexey Brodkin <abrodkin@synopsys.com> | 2018-03-23 15:57:51 +0300 |
commit | f665c14f04d225597cd3cb0c6faa35ddc2a1b2df (patch) | |
tree | eb3bdcf86f1d510ebb913a3a5538b24d1ebe41aa /board | |
parent | 6b85b26e4bc76bcc92571ae90c913b57ae32423c (diff) |
ARC: bootm: Refactor GO and PREP subcommands implementation
Refactor GO and PREP subcommands implementation for a simpler
override in the boards platform code.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/synopsys/axs10x/axs10x.c | 12 | ||||
-rw-r--r-- | board/synopsys/hsdk/hsdk.c | 11 |
2 files changed, 23 insertions, 0 deletions
diff --git a/board/synopsys/axs10x/axs10x.c b/board/synopsys/axs10x/axs10x.c index e6b69da3da..18f7666b15 100644 --- a/board/synopsys/axs10x/axs10x.c +++ b/board/synopsys/axs10x/axs10x.c @@ -47,6 +47,18 @@ int board_early_init_f(void) } #ifdef CONFIG_ISA_ARCV2 + +void board_jump_and_run(ulong entry, int zero, int arch, uint params) +{ + void (*kernel_entry)(int zero, int arch, uint params); + + kernel_entry = (void (*)(int, int, uint))entry; + + smp_set_core_boot_addr(entry, -1); + smp_kick_all_cpus(); + kernel_entry(zero, arch, params); +} + #define RESET_VECTOR_ADDR 0x0 void smp_set_core_boot_addr(unsigned long addr, int corenr) diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c index 7641978a7b..5b3a063b69 100644 --- a/board/synopsys/hsdk/hsdk.c +++ b/board/synopsys/hsdk/hsdk.c @@ -58,6 +58,17 @@ int board_mmc_init(bd_t *bis) return 0; } +void board_jump_and_run(ulong entry, int zero, int arch, uint params) +{ + void (*kernel_entry)(int zero, int arch, uint params); + + kernel_entry = (void (*)(int, int, uint))entry; + + smp_set_core_boot_addr(entry, -1); + smp_kick_all_cpus(); + kernel_entry(zero, arch, params); +} + #define RESET_VECTOR_ADDR 0x0 void smp_set_core_boot_addr(unsigned long addr, int corenr) |