[U-Boot] [PATCH 5/8] sun8i: Display silicon revision of A83t processors

Chen-Yu Tsai wens at csie.org
Tue May 17 07:29:02 CEST 2016


Hi,

On Tue, May 17, 2016 at 10:39 AM,  <tpearson at raptorengineering.com> wrote:

Description please. How did you learn of the different revisions?
Any differences between the revisions?

> Signed-off-by: Timothy Pearson <tpearson at raptorengineeringinc.com>
> ---
>  arch/arm/mach-sunxi/cpu_info.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-sunxi/cpu_info.c b/arch/arm/mach-sunxi/cpu_info.c
> index 76b6719..d552061 100644
> --- a/arch/arm/mach-sunxi/cpu_info.c
> +++ b/arch/arm/mach-sunxi/cpu_info.c
> @@ -50,6 +50,17 @@ uint sunxi_get_sram_id(void)
>
>         return id;
>  }
> +
> +uint sunxi_get_revision(void)
> +{
> +       uint rev;
> +
> +       /* Unlock sram info reg, read it, relock */
> +       rev = readl(SUNXI_SRAMC_BASE + 0x24) & 0x1;
> +
> +       return rev;
> +}
> +
>  #endif
>
>  #ifdef CONFIG_DISPLAY_CPUINFO
> @@ -84,7 +95,7 @@ int print_cpuinfo(void)
>  #elif defined CONFIG_MACH_SUN8I_A33
>         printf("CPU:   Allwinner A33 (SUN8I %04x)\n", sunxi_get_sram_id());
>  #elif defined CONFIG_MACH_SUN8I_A83T
> -       printf("CPU:   Allwinner A83T (SUN8I %04x)\n", sunxi_get_sram_id());
> +       printf("CPU:   Allwinner A83T (SUN8I %04x rev. %s)\n", sunxi_get_sram_id(), (sunxi_get_revision() == 0)?"A":"B");

Please wrap the line properly.

ChenYu

>  #elif defined CONFIG_MACH_SUN8I_H3
>         printf("CPU:   Allwinner H3 (SUN8I %04x)\n", sunxi_get_sram_id());
>  #elif defined CONFIG_MACH_SUN9I
> --
> 2.8.0.rc3
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot


More information about the U-Boot mailing list