s5p: fix the getting cpu_id
authorMinkyu Kang <mk7.kang@samsung.com>
Thu, 19 Aug 2010 08:16:37 +0000 (17:16 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Thu, 19 Aug 2010 08:16:37 +0000 (17:16 +0900)
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
arch/arm/cpu/armv7/s5p-common/cpu_info.c
arch/arm/include/asm/arch-s5pc1xx/cpu.h
arch/arm/include/asm/arch-s5pc2xx/cpu.h

index b2e7e82..3956b84 100644 (file)
@@ -32,7 +32,7 @@ unsigned int s5p_cpu_rev = 1;
 #ifdef CONFIG_ARCH_CPU_INIT
 int arch_cpu_init(void)
 {
-       s5p_set_cpu_id(readl(samsung_get_base_pro_id()));
+       s5p_set_cpu_id();
 #ifndef CONFIG_RECOVERY_BLOCK
        s5p_clock_init();
 #endif
index 87c5059..8986e1a 100644 (file)
 /* Chip ID */
 
 #ifndef __ASSEMBLY__
+#include <asm/io.h>
 /* CPU detection macros */
 extern unsigned int s5p_cpu_id;
 
-static inline void s5p_set_cpu_id(unsigned int id)
+static inline void s5p_set_cpu_id(void)
 {
+       s5p_cpu_id = readl(S5PC100_PRO_ID);
        s5p_cpu_id = 0xC000 | ((id & 0x00FFF000) >> 12);
 }
 
@@ -91,7 +93,7 @@ static inline unsigned int samsung_get_base_##device(void)    \
                return S5PC110_##base;                          \
        else                                                    \
                return 0;                                       \
-}                                                              \
+}
 
 SAMSUNG_BASE(clock, CLOCK_BASE)
 SAMSUNG_BASE(gpio, GPIO_BASE)
index 47554bb..fa22d97 100644 (file)
 #define S5PC210_PWMTIMER_BASE  0x139D0000
 
 #ifndef __ASSEMBLY__
+#include <asm/io.h>
 /* CPU detection macros */
 extern unsigned int s5p_cpu_id;
 
-static inline void s5p_set_cpu_id(unsigned int id)
+static inline void s5p_set_cpu_id(void)
 {
-       s5p_cpu_id = (0xC000 | ((id & 0x00FFF000) >> 12)) + 0x10;
+       s5p_cpu_id = readl(S5PC210_PRO_ID);
+       s5p_cpu_id = (0xC000 | ((s5p_cpu_id & 0x00FFF000) >> 12)) + 0x10;
 }
 
 #define IS_SAMSUNG_TYPE(type, id)                      \