@@ -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
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@raptorengineering.com> --- arch/arm/mach-sunxi/cpu_info.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)