diff options
author | Simon Glass <sjg@chromium.org> | 2023-12-15 20:14:10 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-12-21 16:07:52 -0500 |
commit | 6443a3dad5319d24aa3d88cf11174a84c70e989a (patch) | |
tree | c05ef453d290629d79859d9c9fafc0c2695a48e2 /boot | |
parent | c35bfd07ecdf683b6a80132f5ac6201d6d24c734 (diff) |
bootm: Adjust how the board is reset
Use reset_cpu() to reset the board, copying the logic from the 'reset'
command. This makes more sense than directly calling the do_reset()
function with the arguments passsed to the bootm command.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Diffstat (limited to 'boot')
-rw-r--r-- | boot/bootm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/boot/bootm.c b/boot/bootm.c index 301cfded05..8a0dba5074 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -1140,10 +1140,12 @@ err: if (iflag) enable_interrupts(); - if (ret == BOOTM_ERR_UNIMPLEMENTED) + if (ret == BOOTM_ERR_UNIMPLEMENTED) { bootstage_error(BOOTSTAGE_ID_DECOMP_UNIMPL); - else if (ret == BOOTM_ERR_RESET) - do_reset(cmdtp, flag, argc, argv); + } else if (ret == BOOTM_ERR_RESET) { + printf("Resetting the board...\n"); + reset_cpu(); + } return ret; } |