ARM: k2g: Add support for CPU detection
authorLokesh Vutla <lokeshvutla@ti.com>
Sat, 19 Sep 2015 10:56:38 +0000 (16:26 +0530)
committerTom Rini <trini@konsulko.com>
Thu, 22 Oct 2015 18:22:12 +0000 (14:22 -0400)
Adding CPU detection support for Keystone2 Galileo.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
arch/arm/mach-keystone/include/mach/hardware.h
arch/arm/mach-keystone/init.c

index f98a24eb5738cdd7cd76e27239ccadfbe370e0ec..cbb836c03b97c819ee5ab05153120366f836a7ab 100644 (file)
@@ -247,6 +247,7 @@ typedef volatile unsigned int   *dv_reg_p;
 #define CPU_66AK2Hx    0xb981
 #define CPU_66AK2Ex    0xb9a6
 #define CPU_66AK2Lx    0xb9a7
+#define CPU_66AK2Gx    0xbb06
 
 /* DEVSPEED register */
 #define DEVSPEED_DEVSPEED_SHIFT        16
@@ -291,6 +292,11 @@ static inline u8 cpu_is_k2l(void)
        return get_part_number() == CPU_66AK2Lx;
 }
 
+static inline u8 cpu_is_k2g(void)
+{
+       return get_part_number() == CPU_66AK2Gx;
+}
+
 static inline u8 cpu_revision(void)
 {
        u32 jtag_id     = __raw_readl(KS2_JTAG_ID_REG);
index 678afb16e12f8b28db4c5063712af5231a5c5b15..11572145603e53f00f469fde8473b6115d1144a8 100644 (file)
@@ -169,6 +169,9 @@ int print_cpuinfo(void)
        case CPU_66AK2Ex:
                puts("66AK2Ex SR");
                break;
+       case CPU_66AK2Gx:
+               puts("66AK2Gx SR");
+               break;
        default:
                puts("Unknown\n");
        }