s5pc110: p2: add board detect function & keypad function
authorMinkyu Kang <mk7.kang@samsung.com>
Fri, 4 Dec 2009 06:02:13 +0000 (15:02 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Fri, 4 Dec 2009 06:02:13 +0000 (15:02 +0900)
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
board/samsung/universal/universal.c

index 481618b..b5ecbf0 100644 (file)
@@ -255,6 +255,18 @@ static int board_is_j1b2(void)
        return board == MACH_AQUILA && (board_rev & J1_B2_BOARD);
 }
 
+static int board_is_p2_real(void)
+{
+       int board;
+
+       if (cpu_is_s5pc100())
+               return 0;
+
+       board = gd->bd->bi_arch_number - C110_MACH_START;
+
+       return board == MACH_P1P2 && (board_rev & P2_REAL_BOARD);
+}
+
 #ifdef CONFIG_MISC_INIT_R
 #define DEV_INFO_LEN           512
 static char device_info[DEV_INFO_LEN];
@@ -665,6 +677,10 @@ static void enable_touchkey(void)
        gpio_direction_output(&gpio->gpio_j2, 6, 1);    /* TOUCH_CE */
 }
 
+static void check_p2_keypad(void)
+{
+}
+
 static void check_keypad(void)
 {
        unsigned int reg, value;
@@ -1319,7 +1335,10 @@ int misc_init_r(void)
        setup_p1p2_gpios();
 
        /* To usbdown automatically */
-       check_keypad();
+       if (board_is_p2_real())
+               check_p2_keypad();
+       else
+               check_keypad();
 
        /* check max8998 */
        init_pmic();