s5pc110: add CPU revision checking function
authorMinkyu Kang <mk7.kang@samsung.com>
Mon, 4 Jan 2010 07:43:15 +0000 (16:43 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Mon, 4 Jan 2010 07:43:15 +0000 (16:43 +0900)
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
board/samsung/universal/universal.c
cpu/arm_cortexa8/s5pc1xx/cpu_info.c
include/asm-arm/arch-s5pc1xx/cpu.h

index 32f0dba..b28d877 100644 (file)
@@ -579,6 +579,15 @@ static void show_hw_revision(void)
                board = gd->bd->bi_arch_number - C100_MACH_START;
 
        check_board_revision(board, board_rev);
+
+       /* Set CPU Revision */
+       if (board_is_limo_real()) {
+               if ((board_rev & 0xf) < 8)
+                       s5pc1xx_set_cpu_rev(0);
+       } else {
+               s5pc1xx_set_cpu_rev(0);
+       }
+
        dprintf("HW Revision:\t%x (%s%s)\n", board_rev, board_name[board],
                display_features(board, board_rev));
 }
index f16c0ff..930df7c 100644 (file)
@@ -26,6 +26,8 @@
 
 /* Default is s5pc100 */
 unsigned int s5pc1xx_cpu_id = 0xC100;
+/* Default is EVT1 */
+unsigned int s5pc1xx_cpu_rev = 1;
 
 #ifdef CONFIG_ARCH_CPU_INIT
 int arch_cpu_init(void)
index 90485aa..d6a8688 100644 (file)
@@ -67,6 +67,18 @@ static inline int cpu_is_##type(void)                        \
 
 IS_SAMSUNG_TYPE(s5pc100, 0xc100)
 IS_SAMSUNG_TYPE(s5pc110, 0xc110)
+
+extern unsigned int s5pc1xx_cpu_rev;
+
+static inline int s5pc1xx_get_cpu_rev(void)
+{
+       return s5pc1xx_cpu_rev;
+}
+
+static inline void s5pc1xx_set_cpu_rev(unsigned int rev)
+{
+       s5pc1xx_cpu_rev = rev;
+}
 #endif
 
 #endif /* _S5PC1XX_CPU_H */