diff options
author | Andrei Warkentin <andreiw@motorola.com> | 2011-03-22 11:37:47 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-03-22 11:40:08 -0700 |
commit | d3c9f78e7ec505076ddad2aefaeef5e8c20a4823 (patch) | |
tree | 731464152a2ffa8c7ab33dfe3f8b5a561440240e /drivers | |
parent | 2b3d418209bda3cb28a70e5f6608ccfd35a8906a (diff) |
serial: tegra_hsuart: Make sure current byte rx complete in suspend
Make sure that the last byte has been received by the uart during
suspend after RTS is deasserted.
Change-Id: I3517ec058fdca912ff5ad8770d2b1c5015385385
Signed-off-by: Andrei Warkentin <andreiw@motorola.com>
Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/serial/tegra_hsuart.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/serial/tegra_hsuart.c b/drivers/serial/tegra_hsuart.c index a7c7220b854b..b3b8eeaf8cf6 100644 --- a/drivers/serial/tegra_hsuart.c +++ b/drivers/serial/tegra_hsuart.c @@ -599,16 +599,20 @@ static void tegra_stop_rx(struct uart_port *u) set_rts(t, false); if (t->rx_in_progress) { + wait_sym_time(t, 1); /* wait a character interval */ + ier = t->ier_shadow; ier &= ~(UART_IER_RDI | UART_IER_RLSI | UART_IER_RTOIE | UART_IER_EORD); t->ier_shadow = ier; uart_writeb(t, ier, UART_IER); t->rx_in_progress = 0; - } - if (t->use_rx_dma && t->rx_dma) { - if (!tegra_dma_dequeue_req(t->rx_dma, &t->rx_dma_req)) - tegra_rx_dma_complete_req(t, &t->rx_dma_req); + if (t->use_rx_dma && t->rx_dma) { + if (!tegra_dma_dequeue_req(t->rx_dma, &t->rx_dma_req)) + tegra_rx_dma_complete_req(t, &t->rx_dma_req); + } else { + do_handle_rx_pio(t); + } tty_flip_buffer_push(u->state->port.tty); } |