diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2010-06-16 14:18:51 +0530 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2010-06-16 08:42:54 -0700 |
commit | 25a71aee7f0fabe764a00d9cb5ab28530b40a8d4 (patch) | |
tree | 4b8fc0d2a7737d65afa540eac73a59498b51c840 | |
parent | d04dbece1147fbd7d8ce8ef773edcaf6b97c69f1 (diff) |
[arm/tegra] hsuart: Configuring tristate correctly.
To enable the tristate of the pin, the argument should be either
TEGRA_TRI_TRISTATE or true and for setting it to normal, the
argument should be either false or the TEGRA_TRI_NORMAL.
The code was passing the value of the argument in reverse, for tristate
it was passing the false and for normal it was true.
Passing the correct argument value for setting the tristate and normal.
Change-Id: I3f83ae7672dc4323f695e57c46c3878316a03324
Reviewed-on: http://git-master/r/2749
Reviewed-by: Anantha Idapalapati <aidapalapati@nvidia.com>
Tested-by: Anantha Idapalapati <aidapalapati@nvidia.com>
Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
Tested-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-by: Gary King <gking@nvidia.com>
-rw-r--r-- | drivers/serial/tegra_hsuart.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/serial/tegra_hsuart.c b/drivers/serial/tegra_hsuart.c index 8d1a58ee117d..a39877cb3b64 100644 --- a/drivers/serial/tegra_hsuart.c +++ b/drivers/serial/tegra_hsuart.c @@ -537,6 +537,8 @@ static void tegra_uart_hw_deinit(struct tegra_uart_port *t) clk_disable(t->clk); t->baud = 0; + if (t->pinmux) + tegra_pinmux_config_tristate_table(t->pinmux, t->nr_pins, TEGRA_TRI_TRISTATE); } static void tegra_uart_free_rx_dma(struct tegra_uart_port *t) @@ -567,7 +569,7 @@ static int tegra_uart_hw_init(struct tegra_uart_port *t) t->baud = 0; if (t->pinmux) - tegra_pinmux_config_tristate_table(t->pinmux, t->nr_pins, true); + tegra_pinmux_config_tristate_table(t->pinmux, t->nr_pins, TEGRA_TRI_NORMAL); clk_enable(t->clk); msleep(10); @@ -1123,7 +1125,7 @@ static int tegra_uart_suspend(struct platform_device *pdev, pm_message_t state) u = &t->uport; uart_suspend_port(&tegra_uart_driver, u); if (t->pinmux) - tegra_pinmux_config_tristate_table(t->pinmux, t->nr_pins, false); + tegra_pinmux_config_tristate_table(t->pinmux, t->nr_pins, TEGRA_TRI_TRISTATE); return 0; } @@ -1139,7 +1141,7 @@ static int tegra_uart_resume(struct platform_device *pdev) u = &t->uport; dev_err(t->uport.dev, "tegra_uart_resume called\n"); if (t->pinmux) - tegra_pinmux_config_tristate_table(t->pinmux, t->nr_pins, true); + tegra_pinmux_config_tristate_table(t->pinmux, t->nr_pins, TEGRA_TRI_NORMAL); uart_resume_port(&tegra_uart_driver, u); return 0; } |