diff options
author | Dmitry Fink <finik@ti.com> | 2013-07-08 10:04:44 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-26 22:55:44 (GMT) |
commit | c4415084218c68c5ee2fc583431e89a78d896b19 (patch) | |
tree | ac30d4c6df6236f77142713a0b7ec091a4e5ae0f /drivers/tty/serial/omap-serial.c | |
parent | f64ffda60e2c9b69ff2125e90cfca234b2eece2b (diff) | |
download | linux-fsl-qoriq-c4415084218c68c5ee2fc583431e89a78d896b19.tar.xz |
OMAP: UART: Keep the TX fifo full when possible
Current logic results in interrupt storm since the fifo
is constantly below the threshold level. Change the logic
to fill all the available spaces in the fifo as long as
we have data to minimize the possibilty of underflow and
elimiate excessive interrupts.
Signed-off-by: Dmitry Fink <finik@ti.com>
Signed-off-by: Alexander Savchenko <oleksandr.savchenko@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/omap-serial.c')
-rw-r--r-- | drivers/tty/serial/omap-serial.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 33c758e..9271a1d 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -315,7 +315,8 @@ static void transmit_chars(struct uart_omap_port *up, unsigned int lsr) serial_omap_stop_tx(&up->port); return; } - count = up->port.fifosize / 4; + count = up->port.fifosize - + (serial_in(up, UART_OMAP_TXFIFO_LVL) & 0xFF); do { serial_out(up, UART_TX, xmit->buf[xmit->tail]); xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); |