From 3d41b5a39223a11c0d4305f4bb4c72238b94497b Mon Sep 17 00:00:00 2001 From: Lokesh Vutla Date: Tue, 28 Jul 2015 14:16:42 +0530 Subject: [PATCH] ARM: keystone2: Enable CONFIG_DISPLAY_CPUINFO 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 Reviewed-by: Vitaly Andrianov Signed-off-by: Lokesh Vutla --- arch/arm/mach-keystone/init.c | 32 ++++++++++++++++++++++++++++ include/configs/ti_armv7_keystone2.h | 1 + 2 files changed, 33 insertions(+) diff --git a/arch/arm/mach-keystone/init.c b/arch/arm/mach-keystone/init.c index c96845c4e2..a9a7d41160 100644 --- a/arch/arm/mach-keystone/init.c +++ b/arch/arm/mach-keystone/init.c @@ -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 diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h index 09bdc25508..e66de23502 100644 --- a/include/configs/ti_armv7_keystone2.h +++ b/include/configs/ti_armv7_keystone2.h @@ -14,6 +14,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 -- 2.39.2