summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPradeep Goudagunta <pgoudagunta@nvidia.com>2012-01-04 16:40:05 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2012-01-06 17:09:56 +0530
commitde65f499762661c4d8e5193fc581cb8d529af8b5 (patch)
tree5ccf1fb8315acc5eda6c8fd2dfa7db0f09c4f6a4 /drivers
parentb7b887b7c867959d1d6198efe695e2ad5753e373 (diff)
tty: serial: tegra: Add HW loopback support
Add HW loopback support for testing purpose. Bug 845036 Bug 921090 Signed-off-by: Pradeep Goudagunta <pgoudagunta@nvidia.com> Change-Id: I202781ed0b42c1bed2b9aad9576cf74cb938f9e6 Reviewed-on: http://git-master/r/73149 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/tegra_hsuart.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tty/serial/tegra_hsuart.c b/drivers/tty/serial/tegra_hsuart.c
index f94dc24b5229..fecc3cf46f4d 100644
--- a/drivers/tty/serial/tegra_hsuart.c
+++ b/drivers/tty/serial/tegra_hsuart.c
@@ -847,6 +847,7 @@ static int tegra_startup(struct uart_port *u)
struct tegra_uart_port *t = container_of(u,
struct tegra_uart_port, uport);
int ret = 0;
+ struct tegra_uart_platform_data *pdata;
t = container_of(u, struct tegra_uart_port, uport);
sprintf(t->port_name, "tegra_uart_%d", u->line);
@@ -889,6 +890,9 @@ static int tegra_startup(struct uart_port *u)
if (ret)
goto fail;
+ pdata = u->dev->platform_data;
+ if (pdata->is_loopback)
+ t->mcr_shadow |= UART_MCR_LOOP;
dev_dbg(u->dev, "Requesting IRQ %d\n", u->irq);
msleep(1);