From 34927b6f7f835d21f3ed6f0f3b22953b8b62c740 Mon Sep 17 00:00:00 2001 From: Joonyoung Shim Date: Wed, 14 Oct 2009 11:29:31 +0900 Subject: [PATCH] s5pc110: aquila: Add CODEC_LDO_EN gpio set for limo_universal and j1_b2 Signed-off-by: Joonyoung Shim --- board/samsung/universal/universal.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/board/samsung/universal/universal.c b/board/samsung/universal/universal.c index cb5bee2..5767d8b 100644 --- a/board/samsung/universal/universal.c +++ b/board/samsung/universal/universal.c @@ -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(); -- 2.7.4