[U-Boot] [V2] [PATCH 5/8] sun8i: Display silicon revision of A83t processors
tpearson at raptorengineering.com
tpearson at raptorengineering.com
Tue May 17 21:36:20 CEST 2016
There are two versions of the A83t processor; per the provided
Linux code from Allwinner revisions A and B can be distingushed
by the lower bit of the SRAM ID register. The distinction is
important because revision B requires a SMP bringup workaround.
Signed-off-by: Timothy Pearson <tpearson at raptorengineering.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");
#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
More information about the U-Boot
mailing list