diff mbox series

Revert "board: synquacer: developerbox: Don't set gd->env_addr to default_environment"

Message ID 163721432461.467760.11657628315867225456.stgit@localhost
State New
Headers show
Series Revert "board: synquacer: developerbox: Don't set gd->env_addr to default_environment" | expand

Commit Message

Masami Hiramatsu Nov. 18, 2021, 5:45 a.m. UTC
Without default setting of gd->env_addr, U-Boot will cause
a synchronous abort if the env-variables on the SPI flash is
broken or not saved corectly. Set gd->env_addr correctly.

This reverts commit 535870f3b0fb09ee9b2885409f05304111464643.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
---
 board/socionext/developerbox/developerbox.c |    2 ++
 1 file changed, 2 insertions(+)

Comments

Marek Behún Nov. 18, 2021, 1:42 p.m. UTC | #1
On Thu, 18 Nov 2021 14:45:25 +0900
Masami Hiramatsu <masami.hiramatsu@linaro.org> wrote:

> Without default setting of gd->env_addr, U-Boot will cause
> a synchronous abort if the env-variables on the SPI flash is
> broken or not saved corectly. Set gd->env_addr correctly.
> 
> This reverts commit 535870f3b0fb09ee9b2885409f05304111464643.
> 
> Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
> ---
>  board/socionext/developerbox/developerbox.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/board/socionext/developerbox/developerbox.c b/board/socionext/developerbox/developerbox.c
> index 31b1349514..9552bfcdc3 100644
> --- a/board/socionext/developerbox/developerbox.c
> +++ b/board/socionext/developerbox/developerbox.c
> @@ -82,6 +82,8 @@ int board_init(void)
>  {
>  	gd->bd->bi_boot_params = CONFIG_SYS_LOAD_ADDR + LOAD_OFFSET;
>  
> +	gd->env_addr = (ulong)&default_environment[0];
> +
>  	synquacer_setup_scbm_smmu();
>  
>  	return 0;
> 

Reviewed-by: Marek Behún <marek.behun@nic.cz>

I will look into this when I respin the default environment series.

Marek
Tom Rini Nov. 18, 2021, 11:27 p.m. UTC | #2
On Thu, Nov 18, 2021 at 02:45:25PM +0900, Masami Hiramatsu wrote:

> Without default setting of gd->env_addr, U-Boot will cause
> a synchronous abort if the env-variables on the SPI flash is
> broken or not saved corectly. Set gd->env_addr correctly.
> 
> This reverts commit 535870f3b0fb09ee9b2885409f05304111464643.
> 
> Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
> Reviewed-by: Marek Behún <marek.behun@nic.cz>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/board/socionext/developerbox/developerbox.c b/board/socionext/developerbox/developerbox.c
index 31b1349514..9552bfcdc3 100644
--- a/board/socionext/developerbox/developerbox.c
+++ b/board/socionext/developerbox/developerbox.c
@@ -82,6 +82,8 @@  int board_init(void)
 {
 	gd->bd->bi_boot_params = CONFIG_SYS_LOAD_ADDR + LOAD_OFFSET;
 
+	gd->env_addr = (ulong)&default_environment[0];
+
 	synquacer_setup_scbm_smmu();
 
 	return 0;