mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-22 20:58:22 +00:00
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>
This commit is contained in:
parent
c35bfd07ec
commit
6443a3dad5
1 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue