提交 c4415084 编写于 作者: D Dmitry Fink 提交者: Greg Kroah-Hartman

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: NDmitry Fink <finik@ti.com>
Signed-off-by: NAlexander Savchenko <oleksandr.savchenko@ti.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 f64ffda6
......@@ -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);
......
......@@ -366,6 +366,7 @@
#define UART_OMAP_MDR1_FIR_MODE 0x05 /* FIR mode */
#define UART_OMAP_MDR1_CIR_MODE 0x06 /* CIR mode */
#define UART_OMAP_MDR1_DISABLE 0x07 /* Disable (default state) */
#define UART_OMAP_TXFIFO_LVL 0x1A /* TX FIFO fullness */
/*
* These are definitions for the Exar XR17V35X and XR17(C|D)15X
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册