summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/serial-tegra.c
diff options
context:
space:
mode:
authorJon Hunter <jonathanh@nvidia.com>2015-05-05 15:17:53 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-10 19:12:18 +0200
commit11e71007a5652dce2528a5d2451fe2697c6a370a (patch)
tree523bc8985b6aeb782d6787c16c35db250be9a506 /drivers/tty/serial/serial-tegra.c
parent245c0278ab2a2e3d0360296710b4c285291469b5 (diff)
serial: tegra: Add delay after enabling FIFO mode
For all tegra devices (up to t210), there is a hardware issue that requires software to wait for 3 UART clock periods after enabling the TX fifo, otherwise data could be lost. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/serial-tegra.c')
-rw-r--r--drivers/tty/serial/serial-tegra.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index 9e08d3f07509..0d9d7ceb1dbb 100644
--- a/drivers/tty/serial/serial-tegra.c
+++ b/drivers/tty/serial/serial-tegra.c
@@ -885,6 +885,16 @@ static int tegra_uart_hw_init(struct tegra_uart_port *tup)
tup->fcr_shadow |= TEGRA_UART_TX_TRIG_16B;
tegra_uart_write(tup, tup->fcr_shadow, UART_FCR);
+ /* Dummy read to ensure the write is posted */
+ tegra_uart_read(tup, UART_SCR);
+
+ /*
+ * For all tegra devices (up to t210), there is a hardware issue that
+ * requires software to wait for 3 UART clock periods after enabling
+ * the TX fifo, otherwise data could be lost.
+ */
+ tegra_uart_wait_cycle_time(tup, 3);
+
/*
* Initialize the UART with default configuration
* (115200, N, 8, 1) so that the receive DMA buffer may be