[U-Boot] [PATCH V3 1/2] MX5: factor out boot cause funciton to common code

Fabio Estevam fabioestevam at yahoo.com
Fri Apr 15 14:47:24 CEST 2011


Hi Jason,

--- On Fri, 4/15/11, Jason Liu <r64343 at freescale.com> wrote:
...
> +char *get_reset_cause(void)
> +{
> +    u32 cause;
> +    struct src *src_regs = (struct src
> *)SRC_BASE_ADDR;
> +
> +    cause = readl(&src_regs->srsr);

You need to mask the 7 LSB of SRSR register.

If you don´t bit 16 can still affect its result.

Regards,

Fabio Estevam


More information about the U-Boot mailing list