U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Simon Glass <sjg@chromium.org>,
	U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
	Eddie James <eajames@linux.ibm.com>,
	Safae Ouajih <souajih@baylibre.com>
Subject: Re: [PATCH v2 06/21] bootm: Adjust how the board is reset
Date: Fri, 15 Dec 2023 13:01:13 +0100	[thread overview]
Message-ID: <87le9vu12u.fsf@baylibre.com> (raw)
In-Reply-To: <20231214165112.2182274-2-sjg@chromium.org>

Hi Simon,

Thank you for your patch.

On jeu., déc. 14, 2023 at 09:50, Simon Glass <sjg@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 <sjg@chromium.org>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Reviewed-by: Mattijs Korpershoek <mkorpershoek@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	other threads:[~2023-12-15 12:01 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 16:50 [PATCH v2 00/21] Complete decoupling of bootm logic from commands Simon Glass
2023-12-14 16:50 ` [PATCH v2 01/21] mips: Add a reset_cpu() function Simon Glass
2023-12-14 16:50 ` [PATCH v2 02/21] m68k: " Simon Glass
2023-12-14 16:50 ` [PATCH v2 03/21] ppc: " Simon Glass
2023-12-14 16:50 ` [PATCH v2 04/21] nios2: " Simon Glass
2023-12-14 16:50 ` [PATCH v2 05/21] riscv: " Simon Glass
2023-12-15  6:38   ` Chanho Park
2023-12-14 16:50 ` [PATCH v2 06/21] bootm: Adjust how the board is reset Simon Glass
2023-12-15 12:01   ` Mattijs Korpershoek [this message]
2023-12-14 16:50 ` [PATCH v2 07/21] sandbox: bootm: Enable more bootm OS methods Simon Glass
2023-12-14 16:50 ` [PATCH v2 08/21] bootm: Create a struct for argument information Simon Glass
2023-12-14 17:51   ` Tom Rini
2023-12-14 16:50 ` [PATCH v2 09/21] bootm: Adjust arguments of boot_os_fn Simon Glass
2023-12-14 17:51   ` Tom Rini
2023-12-14 16:50 ` [PATCH v2 10/21] bootm: Add more fields to bootm_info Simon Glass
2023-12-14 17:51   ` Tom Rini
2023-12-14 16:50 ` [PATCH v2 11/21] bootm: Move do_bootm_states() comment to header file Simon Glass
2023-12-14 17:51   ` Tom Rini
2023-12-15 12:02   ` Mattijs Korpershoek
2023-12-14 16:50 ` [PATCH v2 12/21] booti: Avoid use of #ifdef Simon Glass
2023-12-14 17:51   ` Tom Rini
2023-12-14 16:50 ` [PATCH v2 13/21] bootz: " Simon Glass
2023-12-14 17:51   ` Tom Rini
2023-12-14 16:50 ` [PATCH v2 14/21] bootm: Drop arguments from do_bootm_states() Simon Glass
2023-12-14 17:51   ` Tom Rini
2023-12-14 16:50 ` [PATCH v2 15/21] bootm: Rename do_bootm_states() to bootm_run_states() Simon Glass
2023-12-14 17:51   ` Tom Rini
2023-12-14 16:50 ` [PATCH v2 16/21] bootm: Tidy up boot_selected_os() Simon Glass
2023-12-14 17:51   ` Tom Rini
2023-12-14 16:50 ` [PATCH v2 17/21] bootm: Create a function to run through the bootm states Simon Glass
2023-12-14 17:51   ` Tom Rini
2023-12-14 16:50 ` [PATCH v2 18/21] stm32: Use local vars in stm32prog for initrd and fdt Simon Glass
2023-12-15 11:55   ` Patrick DELAUNAY
2023-12-14 16:50 ` [PATCH v2 19/21] bootm: Create a function to run through the bootz states Simon Glass
2023-12-14 16:50 ` [PATCH v2 20/21] stm32: Use bootm_run() and bootz_run() Simon Glass
2023-12-15 11:57   ` Patrick DELAUNAY
2023-12-14 16:50 ` [PATCH v2 21/21] bootm: Create a function to run through the booti states Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87le9vu12u.fsf@baylibre.com \
    --to=mkorpershoek@baylibre.com \
    --cc=eajames@linux.ibm.com \
    --cc=sjg@chromium.org \
    --cc=souajih@baylibre.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox