diff options
author | Tom Rini <trini@konsulko.com> | 2023-12-21 16:10:00 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-12-21 16:10:00 -0500 |
commit | 7c4647b8fb448ac658a9bc726681ad9e75e6b9e8 (patch) | |
tree | 5ecb1a3c90c2fc5c16176914748ad207005772a3 /arch/mips | |
parent | ced928b1994b6dd8d133797f506c0991b0e6196d (diff) | |
parent | d37086a95f4b2c39f9ecfe602b792df8ab3bd8f9 (diff) | |
download | u-boot-7c4647b8fb448ac658a9bc726681ad9e75e6b9e8.tar.gz u-boot-7c4647b8fb448ac658a9bc726681ad9e75e6b9e8.tar.bz2 u-boot-7c4647b8fb448ac658a9bc726681ad9e75e6b9e8.zip |
Merge patch series "Complete decoupling of bootm logic from commands"
Simon Glass <sjg@chromium.org> says:
This series continues refactoring the bootm code to allow it to be used
with CONFIG_COMMAND disabled. The OS-handling code is refactored and
a new bootm_run() function is created to run through the bootm stages.
This completes the work.
A booti_go() function is created also, in case it proves useful, but at
last for now standard boot does not use this.
This is cmdd (part d of CMDLINE refactoring)
It depends on dm/bootstda-working
which depends on dm/cmdc-working
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/cpu/cpu.c | 8 | ||||
-rw-r--r-- | arch/mips/lib/bootm.c | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/arch/mips/cpu/cpu.c b/arch/mips/cpu/cpu.c index acfc9dc43f..4434650477 100644 --- a/arch/mips/cpu/cpu.c +++ b/arch/mips/cpu/cpu.c @@ -4,6 +4,7 @@ * Wolfgang Denk, DENX Software Engineering, <wd@denx.de> */ +#include <cpu_func.h> #include <command.h> #include <init.h> #include <linux/compiler.h> @@ -20,9 +21,14 @@ void __weak _machine_restart(void) /* NOP */; } -int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +void reset_cpu(void) { _machine_restart(); +} + +int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +{ + reset_cpu(); return 0; } diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c index f1cff691f4..adb6b6cc22 100644 --- a/arch/mips/lib/bootm.c +++ b/arch/mips/lib/bootm.c @@ -4,6 +4,7 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ +#include <bootm.h> #include <bootstage.h> #include <env.h> #include <image.h> @@ -216,7 +217,7 @@ static int boot_reloc_fdt(struct bootm_headers *images) { /* * In case of legacy uImage's, relocation of FDT is already done - * by do_bootm_states() and should not repeated in 'bootm prep'. + * by bootm_run_states() and should not repeated in 'bootm prep'. */ if (images->state & BOOTM_STATE_FDT) { debug("## FDT already relocated\n"); @@ -300,9 +301,10 @@ static void boot_jump_linux(struct bootm_headers *images) linux_extra); } -int do_bootm_linux(int flag, int argc, char *const argv[], - struct bootm_headers *images) +int do_bootm_linux(int flag, struct bootm_info *bmi) { + struct bootm_headers *images = bmi->images; + /* No need for those on MIPS */ if (flag & BOOTM_STATE_OS_BD_T) return -1; |