[U-Boot] [PATCH] arm: socfpga: dm: Fix DM initialization failure after warm reset

Simon Glass sjg at chromium.org
Sat Aug 29 01:21:31 CEST 2015


Hi,

On 28 August 2015 at 02:41, Jian Luo <Jian.Luo4 at boschrexroth.de> wrote:
> gd->dm_root is not cleared in SPL after warm reset.
> This might cause DM initilazation failure.
>
> Signed-off-by: Jian Luo <jian.luo4 at boschrexroth.de>
> ---
>  arch/arm/mach-socfpga/spl.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/arch/arm/mach-socfpga/spl.c b/arch/arm/mach-socfpga/spl.c
> index 13ec24b..59fe1f2 100644
> --- a/arch/arm/mach-socfpga/spl.c
> +++ b/arch/arm/mach-socfpga/spl.c
> @@ -181,5 +181,11 @@ void board_init_f(ulong dummy)
>         /* Configure simple malloc base pointer into RAM. */
>         gd->malloc_base = CONFIG_SYS_TEXT_BASE + (1024 * 1024);
>
> +       /*
> +        * gd->dm_root might contain non-zero value after warm reset.
> +        * Clear it to avoid dm_init error
> +        */
> +       gd->dm_root = NULL;
> +
>         board_init_r(NULL, 0);
>  }
> --
> 1.9.1
>

This does not look like the root cause to me. global_data is zeroed by
crt0.S if CONFIG_SPL_FRAMEWORK is set, which it seems to be for
socfpga.

What boot path does 'warm reset' take?

Also BTW it would be better if board_init_f() returned rather than
calling board_init_r() directly.

Regards,
Simon


More information about the U-Boot mailing list