diff options
author | Lokesh Vutla <lokeshvutla@ti.com> | 2015-07-28 14:16:42 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-08-12 20:47:51 -0400 |
commit | aeabe652bbfd1ed11e0e0eebb46812afdb2e9401 (patch) | |
tree | f5a468cee474a76424575aa8179c39e5f9649bf3 /arch/arm/mach-keystone | |
parent | cfe5f0cda0f39fe833233fdffbac127fd7b3db4e (diff) | |
download | u-boot-aeabe652bbfd1ed11e0e0eebb46812afdb2e9401.tar.gz |
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 <trini@konsulko.com>
Reviewed-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'arch/arm/mach-keystone')
-rw-r--r-- | arch/arm/mach-keystone/init.c | 32 |
1 files changed, 32 insertions, 0 deletions
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 |