From: Piotr Wilczek
Date: Wed, 22 Jan 2014 14:54:31 +0000 (+0100)
Subject: arm:s5pc110: add cpu revision
X-Git-Tag: v2014.04-rc1~77^2~14^2~8
X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d1cbf0a5ad8af65c8c1b9a0c848363de7ede91fe;p=u-boot
arm:s5pc110: add cpu revision
This patch adds s5p_cpu_rev.
Signed-off-by: Piotr Wilczek
Signed-off-by: Kyungmin Park
Signed-off-by: Minkyu Kang
---
diff --git a/arch/arm/include/asm/arch-s5pc1xx/cpu.h b/arch/arm/include/asm/arch-s5pc1xx/cpu.h
index 4fc5a0c3c9..5ae5c87169 100644
--- a/arch/arm/include/asm/arch-s5pc1xx/cpu.h
+++ b/arch/arm/include/asm/arch-s5pc1xx/cpu.h
@@ -51,10 +51,17 @@
#include
/* CPU detection macros */
extern unsigned int s5p_cpu_id;
+extern unsigned int s5p_cpu_rev;
+
+static inline int s5p_get_cpu_rev(void)
+{
+ return s5p_cpu_rev;
+}
static inline void s5p_set_cpu_id(void)
{
s5p_cpu_id = readl(S5PC100_PRO_ID);
+ s5p_cpu_rev = s5p_cpu_id & 0x000000FF;
s5p_cpu_id = 0xC000 | ((s5p_cpu_id & 0x00FFF000) >> 12);
}