summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorPradeep Goudagunta <pgoudagunta@nvidia.com>2010-12-17 16:15:05 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:43:17 -0800
commit47698fab6c5bae3fddca56b3f5a70e4ea6272982 (patch)
treee5299f1aaedae1e5d32976c0575ee8bd6c197a51 /drivers/tty
parentba5ef826c280d537c2619372eba0520682037309 (diff)
[ARM] tegra:uart:Reseting Tx fifo in non fifo mode
If Tx fifo is reset in fifo mode then extra bytes were seen in receiver end ASIC team recommended following as SW workaround -Disable fifo mode -Delay for 8x clock cycles -Reset Tx fifo -Enable fifo mode Bug : 742346 Original-Change-Id: Ia091d0050dd7137e874acc2948e517b76c0743b6 Reviewed-on: http://git-master/r/13610 Tested-by: Pradeep Goudagunta <pgoudagunta@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Original-Change-Id: Iebc31029adbe2b4d5d56403d09cf5636a5160262 Rebase-Id: R4a6f15b3fe887c2247bec8508570dd6cc33a0456
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/tegra_hsuart.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/tty/serial/tegra_hsuart.c b/drivers/tty/serial/tegra_hsuart.c
index f95bfff57d87..36dd63b45500 100644
--- a/drivers/tty/serial/tegra_hsuart.c
+++ b/drivers/tty/serial/tegra_hsuart.c
@@ -363,8 +363,20 @@ static void wait_sym_time(struct tegra_uart_port *t, unsigned int syms)
static void tegra_fifo_reset(struct tegra_uart_port *t, u8 fcr_bits)
{
unsigned char fcr = t->fcr_shadow;
+#ifdef CONFIG_ARCH_TEGRA_3x_SOC
+ /*Hw issue: Resetting tx fifo with non-fifo
+ mode to avoid any extra character to be sent*/
+ fcr &= ~UART_FCR_ENABLE_FIFO;
+ uart_writeb(t, fcr, UART_FCR);
+ udelay(60);
+ fcr |= fcr_bits & (UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT);
+ uart_writeb(t, fcr, UART_FCR);
+ fcr |= UART_FCR_ENABLE_FIFO;
+ uart_writeb(t, fcr, UART_FCR);
+#else
fcr |= fcr_bits & (UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT);
uart_writeb(t, fcr, UART_FCR);
+#endif
uart_readb(t, UART_SCR); /* Dummy read to ensure the write is posted */
wait_sym_time(t, 1); /* Wait for the flush to propagate. */
}