s5pc110: aquila: Add CODEC_LDO_EN gpio set for limo_universal and j1_b2
authorJoonyoung Shim <jy0922.shim@samsung.com>
Wed, 14 Oct 2009 02:29:31 +0000 (11:29 +0900)
committerJoonyoung Shim <jy0922.shim@samsung.com>
Wed, 14 Oct 2009 02:29:31 +0000 (11:29 +0900)
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
board/samsung/universal/universal.c

index cb5bee2..5767d8b 100644 (file)
@@ -146,6 +146,18 @@ static int machine_is_aquila(void)
        return board == MACH_AQUILA;
 }
 
+static int board_is_j1b2(void)
+{
+       int board;
+
+       if (cpu_is_s5pc100())
+               return 0;
+
+       board = gd->bd->bi_arch_number - C110_MACH_START;
+
+       return board == MACH_AQUILA && (board_rev & J1_B2_BOARD_FEATURE);
+}
+
 static int board_is_limo_universal(void)
 {
        int board;
@@ -410,6 +422,17 @@ static void enable_t_flash(void)
        gpio_direction_output(&gpio->gpio_mp0_5, 4, 1);
 }
 
+static void enable_codec_ldo(void)
+{
+       struct s5pc110_gpio *gpio = (struct s5pc110_gpio *)S5PC110_GPIO_BASE;
+
+       if (!(board_is_limo_universal() || board_is_j1b2()))
+               return;
+
+       /* CODEC_LDO_EN: XM0FRNB_2: MP0_3[6] output high */
+       gpio_direction_output(&gpio->gpio_mp0_3, 6, 1);
+}
+
 static void setup_limo_real_gpios(void)
 {
        struct s5pc110_gpio *gpio = (struct s5pc110_gpio *)S5PC110_GPIO_BASE;
@@ -865,6 +888,9 @@ int misc_init_r(void)
        /* Enable T-Flash at Limo Universal */
        enable_t_flash();
 
+       /* Enable Codec LDO at Limo Universal an J1_B2 */
+       enable_codec_ldo();
+
        /* Setup Limo Real board GPIOs */
        setup_limo_real_gpios();