]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/include/asm/arch-s5pc2xx/cpu.h
S5PC2XX: Support the cpu revision
[u-boot] / arch / arm / include / asm / arch-s5pc2xx / cpu.h
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)                      \