From bbc834999a6978efe2f3f8020ab9ee599e0fe543 Mon Sep 17 00:00:00 2001 From: Qiufang Dai Date: Mon, 18 Dec 2017 21:56:00 +0800 Subject: [PATCH] cpuinfo: cputype api for G12A PD#156734: cpuinfo: cputype api for G12A Change-Id: Ib21038d4c622d0ca48c714f3773e63c89c408929 Signed-off-by: Qiufang Dai --- include/linux/amlogic/cpu_version.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/linux/amlogic/cpu_version.h b/include/linux/amlogic/cpu_version.h index c381cdf3044e..2a854f3a9cbd 100644 --- a/include/linux/amlogic/cpu_version.h +++ b/include/linux/amlogic/cpu_version.h @@ -29,6 +29,9 @@ #define MESON_CPU_MAJOR_ID_GXLX 0x26 #define MESON_CPU_MAJOR_ID_TXHD 0x27 +#define MESON_CPU_MAJOR_ID_G12A 0x28 +#define MESON_CPU_MAJOR_ID_G12B 0x29 + #define MESON_CPU_VERSION_LVL_MAJOR 0 #define MESON_CPU_VERSION_LVL_MINOR 1 #define MESON_CPU_VERSION_LVL_PACK 2 @@ -152,6 +155,11 @@ static inline bool is_meson_txhd_cpu(void) return get_cpu_type() == MESON_CPU_MAJOR_ID_TXHD; } +static inline bool is_meson_g12a_cpu(void) +{ + return get_cpu_type() == MESON_CPU_MAJOR_ID_G12A; +} + static inline bool cpu_after_eq(unsigned int id) { return get_cpu_type() >= id;