[U-Boot] [PATCH] imx: save reset cause in 'reset_cause' environment variable
Eric Nelson
eric.nelson at boundarydevices.com
Fri Feb 6 21:36:15 CET 2015
Hi all,
On 02/05/2015 03:57 PM, Eric Nelson wrote:
> The cause of a reset is generally useful, and shouldn't be
> blindly cleared in the process of displaying it as a part
> of the boot announcement.
>
> Stash the string representation in the environment variable
> "reset_cause".
>
>
> <snip>
>
> Signed-off-by: Eric Nelson <eric.nelson at boundarydevices.com>
> ---
> arch/arm/imx-common/cpu.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c
> index 28ccd29..31d6e61 100644
> --- a/arch/arm/imx-common/cpu.c
> +++ b/arch/arm/imx-common/cpu.c
> @@ -32,6 +32,8 @@ char *get_reset_cause(void)
> cause = readl(&src_regs->srsr);
> writel(cause, &src_regs->srsr);
>
> + setenv_hex("reset_cause", cause);
> +
Nak.
This routine is called before the environment is initialized.
More information about the U-Boot
mailing list