[U-Boot] [PATCH] mx31: Improve the handling of unidentified silicon version

Graeme Russ graeme.russ at gmail.com
Wed Jun 15 00:46:43 CEST 2011


On Wed, Jun 15, 2011 at 2:31 AM, Fabio Estevam
<fabio.estevam at freescale.com> wrote:
> MX31 Reference Manual states the following possible values for the silicon revision:
>
> .srev = 0x00,
> .srev = 0x10,
> .srev = 0x11,
> .srev = 0x12,
> .srev = 0x13,
> .srev = 0x14,
> .srev = 0x15,
> .srev = 0x28,
> .srev = 0x29,
>
> However it is possible to find some pre-production silicon on some old hardware, such as MX31ADS
> that shows srev = 0x20.
>
> The following message is the currently displayed on such MX31ADS board:
>
> CPU:   Freescale i.MX31 rev 2.0 unknown at 531 MHz.Reset cause: WDOG
>
> With this patch we see a better message like:
>
> CPU:   Freescale i.MX31 rev 0.0 (unknown revision) at 531 MHz.Reset cause: WDOG
>
> Reported-by: Felix Radensky <felix at embedded-sol.com>
> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
> ---
>  arch/arm/cpu/arm1136/mx31/generic.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/cpu/arm1136/mx31/generic.c b/arch/arm/cpu/arm1136/mx31/generic.c
> index 4ebf38d..770d359 100644
> --- a/arch/arm/cpu/arm1136/mx31/generic.c
> +++ b/arch/arm/cpu/arm1136/mx31/generic.c
> @@ -130,7 +130,7 @@ u32 get_cpu_rev(void)
>                if (srev == mx31_cpu_type[i].srev)
>                        return mx31_cpu_type[i].v;
>
> -       return srev | 0x8000;
> +       return 0x8000;
>  }

Why clobber possibly useful information?

>
>  static char *get_reset_cause(void)
> @@ -162,7 +162,7 @@ int print_cpuinfo (void)
>
>        printf("CPU:   Freescale i.MX31 rev %d.%d%s at %d MHz.",
>                        (srev & 0xF0) >> 4, (srev & 0x0F),
> -                       ((srev & 0x8000) ? " unknown" : ""),
> +                       ((srev & 0x8000) ? " (unknown revision)" : ""),

I would just leave the patch at this

>                        mx31_get_mcu_main_clk() / 1000000);
>        printf("Reset cause: %s\n", get_reset_cause());
>        return 0;

Regards,

Graeme


More information about the U-Boot mailing list