Skip to content

Commit

Permalink
serial: tegra: Add delay after enabling FIFO mode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jon Hunter authored and Greg Kroah-Hartman committed May 10, 2015
1 parent 245c027 commit 11e7100
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/tty/serial/serial-tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 11e7100

Please sign in to comment.