Exynos based SoC's have two different naming conventions. One is S5PC_XXXX and other is EXXX_XXXX. This patch adds generic code to handle EXXX_XXXX connvention.
Signed-off-by: Chander Kashyap chander.kashyap@linaro.org --- arch/arm/include/asm/arch-exynos/cpu.h | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h index 89f2c2e..da89ccf 100644 --- a/arch/arm/include/asm/arch-exynos/cpu.h +++ b/arch/arm/include/asm/arch-exynos/cpu.h @@ -105,10 +105,13 @@ static inline void s5p_set_cpu_id(void) } }
+#define EXYNOS_ID ((readl(EXYNOS4_PRO_ID) & (0xF << 24)) >> 24) #define IS_SAMSUNG_TYPE(type, id) \ static inline int cpu_is_##type(void) \ { \ - return s5p_cpu_id == id ? 1 : 0; \ + return ((s5p_cpu_id == id) \ + || (EXYNOS_ID == (#type[sizeof(#type) - 2] - '0'))) \ + ? 1 : 0; \ }
IS_SAMSUNG_TYPE(exynos4, 0xc210)