]> git.sur5r.net Git - u-boot/commitdiff
ARM: keystone2: Enable CONFIG_DISPLAY_CPUINFO
authorLokesh Vutla <lokeshvutla@ti.com>
Tue, 28 Jul 2015 08:46:42 +0000 (14:16 +0530)
committerTom Rini <trini@konsulko.com>
Thu, 13 Aug 2015 00:47:51 +0000 (20:47 -0400)
Add print_cpuinfo() function and enable
CONFIG_DISPLAY_CPUINFO for keystone platforms,
so that cpu info can be displayed during boot.

Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
arch/arm/mach-keystone/init.c
include/configs/ti_armv7_keystone2.h

index c96845c4e27b93600454daa07d9cc87e483d39a2..a9a7d41160126e571ff073575c787a453df7a044 100644 (file)
@@ -149,3 +149,35 @@ void enable_caches(void)
        dcache_enable();
 #endif
 }
+
+#if defined(CONFIG_DISPLAY_CPUINFO)
+int print_cpuinfo(void)
+{
+       u16 cpu = get_part_number();
+       u8 rev = cpu_revision();
+
+       puts("CPU: ");
+       switch (cpu) {
+       case CPU_66AK2Hx:
+               puts("66AK2Hx SR");
+               break;
+       case CPU_66AK2Lx:
+               puts("66AK2Lx SR");
+               break;
+       case CPU_66AK2Ex:
+               puts("66AK2Ex SR");
+               break;
+       default:
+               puts("Unknown\n");
+       }
+
+       if (rev == 2)
+               puts("2.0\n");
+       else if (rev == 1)
+               puts("1.1\n");
+       else if (rev == 0)
+               puts("1.0\n");
+
+       return 0;
+}
+#endif
index af89f7090f954a8b044fdebb693a5337f00bbfb4..4e69ab288e777ccb0d5591884c3ca0bd6c7eb655 100644 (file)
@@ -15,6 +15,7 @@
 /* U-Boot Build Configuration */
 #define CONFIG_SKIP_LOWLEVEL_INIT      /* U-Boot is a 2nd stage loader */
 #define CONFIG_BOARD_EARLY_INIT_F
+#define CONFIG_DISPLAY_CPUINFO
 
 /* SoC Configuration */
 #define CONFIG_ARCH_CPU_INIT