diff options
author | Qipan Li <Qipan.Li@csr.com> | 2014-07-03 09:26:59 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-09 20:37:00 -0400 |
commit | 7282cec90365533befce1552ab09edbcd0af0dbd (patch) | |
tree | 746863b71b6ed12fbaaedfe6f41541fad5c056b9 /drivers/tty/serial | |
parent | a9977620a448f12a7337daca452fd20e89a96e23 (diff) |
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 <Qipan.Li@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/sirfsoc_uart.c | 3 | ||||
-rw-r--r-- | drivers/tty/serial/sirfsoc_uart.h | 2 |
2 files changed, 3 insertions, 2 deletions
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) | |||
290 | if (sirfport->tx_dma_chan) | 290 | if (sirfport->tx_dma_chan) |
291 | sirfsoc_uart_tx_with_dma(sirfport); | 291 | sirfsoc_uart_tx_with_dma(sirfport); |
292 | else { | 292 | else { |
293 | sirfsoc_uart_pio_tx_chars(sirfport, 1); | 293 | sirfsoc_uart_pio_tx_chars(sirfport, |
294 | SIRFSOC_UART_IO_TX_REASONABLE_CNT); | ||
294 | wr_regl(port, ureg->sirfsoc_tx_fifo_op, SIRFUART_FIFO_START); | 295 | wr_regl(port, ureg->sirfsoc_tx_fifo_op, SIRFUART_FIFO_START); |
295 | if (!sirfport->is_marco) | 296 | if (!sirfport->is_marco) |
296 | wr_regl(port, ureg->sirfsoc_int_en_reg, | 297 | wr_regl(port, ureg->sirfsoc_int_en_reg, |
diff --git a/drivers/tty/serial/sirfsoc_uart.h b/drivers/tty/serial/sirfsoc_uart.h index 69a62ebd3afc..6a7ebf7ef130 100644 --- a/drivers/tty/serial/sirfsoc_uart.h +++ b/drivers/tty/serial/sirfsoc_uart.h | |||
@@ -449,4 +449,4 @@ struct sirfsoc_uart_port { | |||
449 | 449 | ||
450 | /* I/O Mode */ | 450 | /* I/O Mode */ |
451 | #define SIRFSOC_UART_IO_RX_MAX_CNT 256 | 451 | #define SIRFSOC_UART_IO_RX_MAX_CNT 256 |
452 | #define SIRFSOC_UART_IO_TX_REASONABLE_CNT 6 | 452 | #define SIRFSOC_UART_IO_TX_REASONABLE_CNT 256 |