Skip to content
Snippets Groups Projects
Commit c473ac64 authored by Devin Kim's avatar Devin Kim
Browse files

ARM: dory: Set the gpio configuration for uart console


Set the gpios for uart to the uart funtion only if the uart console is
enabled. Otherwise, set the gpios to pull-downed gpios.

Change-Id: I834b7592fec89ad73a04b105f02bd258a1b78dbb
Signed-off-by: default avatarDevin Kim <dojip.kim@lge.com>
parent 8029f157
Branches
Tags
No related merge requests found
......@@ -50,6 +50,47 @@ static struct gpiomux_setting gpio_console_uart_rx_cfg = {
.pull = GPIOMUX_PULL_DOWN,
};
static struct gpiomux_setting gpio_console_uart_disabled = {
.func = GPIOMUX_FUNC_GPIO,
.drv = GPIOMUX_DRV_2MA,
.pull = GPIOMUX_PULL_DOWN,
.dir = GPIOMUX_IN,
};
static struct msm_gpiomux_config msm_console_uart_configs[] __initdata = {
{
.gpio = 8, /* BLSP1 QUP3 UART_TX */
.settings = {
[GPIOMUX_ACTIVE] = &gpio_console_uart_tx_cfg,
[GPIOMUX_SUSPENDED] = &gpio_console_uart_tx_cfg,
},
},
{
.gpio = 9, /* BLSP1 QUP3 UART_RX */
.settings = {
[GPIOMUX_ACTIVE] = &gpio_console_uart_rx_cfg,
[GPIOMUX_SUSPENDED] = &gpio_console_uart_rx_cfg,
},
},
};
static struct msm_gpiomux_config msm_console_uart_disabled_configs[] __initdata = {
{
.gpio = 8, /* GPIO */
.settings = {
[GPIOMUX_ACTIVE] = &gpio_console_uart_disabled,
[GPIOMUX_SUSPENDED] = &gpio_console_uart_disabled,
},
},
{
.gpio = 9, /* GPIO */
.settings = {
[GPIOMUX_ACTIVE] = &gpio_console_uart_disabled,
[GPIOMUX_SUSPENDED] = &gpio_console_uart_disabled,
},
},
};
static struct msm_gpiomux_config msm_keypad_configs[] __initdata = {
{
.gpio = 106,
......@@ -132,20 +173,6 @@ static struct msm_gpiomux_config msm_blsp_configs[] __initdata = {
[GPIOMUX_SUSPENDED] = &gpio_i2c_config
},
},
{
.gpio = 8, /* BLSP1 QUP3 UART_TX */
.settings = {
[GPIOMUX_ACTIVE] = &gpio_console_uart_tx_cfg,
[GPIOMUX_SUSPENDED] = &gpio_console_uart_tx_cfg,
},
},
{
.gpio = 9, /* BLSP1 QUP3 UART_RX */
.settings = {
[GPIOMUX_ACTIVE] = &gpio_console_uart_rx_cfg,
[GPIOMUX_SUSPENDED] = &gpio_console_uart_rx_cfg,
},
},
{
.gpio = 10,
.settings = {
......@@ -710,6 +737,13 @@ void __init msm8226_init_gpiomux(void)
return;
}
if (lge_uart_console_enabled())
msm_gpiomux_install(msm_console_uart_configs,
ARRAY_SIZE(msm_console_uart_configs));
else
msm_gpiomux_install(msm_console_uart_disabled_configs,
ARRAY_SIZE(msm_console_uart_disabled_configs));
msm_gpiomux_install(msm_keypad_configs,
ARRAY_SIZE(msm_keypad_configs));
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment