Hi Simon,

Thank you for your patch.

On jeu., déc. 14, 2023 at 09:50, Simon Glass <s...@chromium.org> wrote:

> 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 <s...@chromium.org>
> Reviewed-by: Tom Rini <tr...@konsulko.com>

Reviewed-by: Mattijs Korpershoek <mkorpersh...@baylibre.com>

> ---
>
> (no changes since v1)
>
>  boot/bootm.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/boot/bootm.c b/boot/bootm.c
> index 301cfded05cb..8a0dba5074e8 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;
>  }
> -- 
> 2.43.0.472.g3155946c3a-goog

Reply via email to