summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/arch-s5pc1xx/cpu.h
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2010-08-19 20:41:50 +0900
committerMinkyu Kang <mk7.kang@samsung.com>2010-08-23 15:34:25 +0900
commit37168dab52bf8419a2fd91d2c098aed5c675ae50 (patch)
treef443dfeb9660ae669fd394d5ac850497c5bcc0de /arch/arm/include/asm/arch-s5pc1xx/cpu.h
parent852bd07c80b27f330da8da367989bcd8121569a7 (diff)
downloadblackbird-obmc-uboot-37168dab52bf8419a2fd91d2c098aed5c675ae50.tar.gz
blackbird-obmc-uboot-37168dab52bf8419a2fd91d2c098aed5c675ae50.zip
ARMV7: S5P: rename from s5pc1xx to s5p
Because of these are common files around s5p Socs, rename from s5pc1xx to s5p. And getting cpu_id is SoC specific, so move to SoC's header file. Signed-off-by: Minkyu Kang <mk7.kang@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'arch/arm/include/asm/arch-s5pc1xx/cpu.h')
-rw-r--r--arch/arm/include/asm/arch-s5pc1xx/cpu.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/arm/include/asm/arch-s5pc1xx/cpu.h b/arch/arm/include/asm/arch-s5pc1xx/cpu.h
index bcb8f5c774..0e80ba3303 100644
--- a/arch/arm/include/asm/arch-s5pc1xx/cpu.h
+++ b/arch/arm/include/asm/arch-s5pc1xx/cpu.h
@@ -57,13 +57,20 @@
#define S5PC110_VIC3_BASE 0xF2300000
#ifndef __ASSEMBLY__
+#include <asm/io.h>
/* CPU detection macros */
-extern unsigned int s5pc1xx_cpu_id;
+extern unsigned int s5p_cpu_id;
+
+static inline void s5p_set_cpu_id(void)
+{
+ s5p_cpu_id = readl(S5PC100_PRO_ID);
+ s5p_cpu_id = 0xC000 | ((s5p_cpu_id & 0x00FFF000) >> 12);
+}
#define IS_SAMSUNG_TYPE(type, id) \
static inline int cpu_is_##type(void) \
{ \
- return s5pc1xx_cpu_id == id ? 1 : 0; \
+ return s5p_cpu_id == id ? 1 : 0; \
}
IS_SAMSUNG_TYPE(s5pc100, 0xc100)
OpenPOWER on IntegriCloud