From 7282cec90365533befce1552ab09edbcd0af0dbd Mon Sep 17 00:00:00 2001 From: Qipan Li Date: Thu, 3 Jul 2014 21:26:59 +0800 Subject: serial: sirf: transfer more bytes once to decrease interrupts the current codes send 1 bytes, then after getting TX done interrupt, send subsequent bytes. it causes redundant interrupts. for example, if we have 3 bytes in TX buffer, the TX flow is: 1. send 1 byte 2. get TX down interrupt 3. send the left 2 bytes 4. get TX down interrupt this patch moves to send more bytes and decrease interrupts, the new flow is: 1. send 3 bytes 2. get TX down interrupt Signed-off-by: Qipan Li Signed-off-by: Barry Song Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/sirfsoc_uart.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/tty/serial/sirfsoc_uart.c') diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c index 9b4d71cff00d..4102192687ee 100644 --- a/drivers/tty/serial/sirfsoc_uart.c +++ b/drivers/tty/serial/sirfsoc_uart.c @@ -290,7 +290,8 @@ static void sirfsoc_uart_start_tx(struct uart_port *port) if (sirfport->tx_dma_chan) sirfsoc_uart_tx_with_dma(sirfport); else { - sirfsoc_uart_pio_tx_chars(sirfport, 1); + sirfsoc_uart_pio_tx_chars(sirfport, + SIRFSOC_UART_IO_TX_REASONABLE_CNT); wr_regl(port, ureg->sirfsoc_tx_fifo_op, SIRFUART_FIFO_START); if (!sirfport->is_marco) wr_regl(port, ureg->sirfsoc_int_en_reg, -- cgit v1.2.3