]> git.sur5r.net Git - u-boot/commitdiff
S5PC2XX: Support the cpu revision
authorMinkyu Kang <mk7.kang@samsung.com>
Mon, 16 May 2011 10:45:54 +0000 (19:45 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Thu, 26 May 2011 10:31:11 +0000 (19:31 +0900)
S5PC210 SoC have two cpu revisions, and have some difference.
So, support the cpu revision for each revision.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
arch/arm/cpu/armv7/s5p-common/cpu_info.c
arch/arm/include/asm/arch-s5pc2xx/cpu.h

index c8a543a45282621e16846c7559960b06a127e787..527f32deefc076f22cff510886c8638b891fcdd3 100644 (file)
@@ -26,6 +26,8 @@
 
 /* Default is s5pc100 */
 unsigned int s5p_cpu_id = 0xC100;
+/* Default is EVT1 */
+unsigned int s5p_cpu_rev = 1;
 
 #ifdef CONFIG_ARCH_CPU_INIT
 int arch_cpu_init(void)
index d56ee802fc948a2dc5d6a16f2f8450a80d224d19..f9015c76f122930be8e8f33334f55135692b942a 100644 (file)
 #include <asm/io.h>
 /* 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)
 {
@@ -61,8 +67,12 @@ static inline void s5p_set_cpu_id(void)
         * 0xC200: S5PC210 EVT0
         * 0xC210: S5PC210 EVT1
         */
-       if (s5p_cpu_id == 0xC200)
+       if (s5p_cpu_id == 0xC200) {
                s5p_cpu_id |= 0x10;
+               s5p_cpu_rev = 0;
+       } else if (s5p_cpu_id == 0xC210) {
+               s5p_cpu_rev = 1;
+       }
 }
 
 #define IS_SAMSUNG_TYPE(type, id)                      \