Skip to content

Commit 7282cec

Browse files
Qipan Ligregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Barry Song <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a997762 commit 7282cec

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

drivers/tty/serial/sirfsoc_uart.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@ static void sirfsoc_uart_start_tx(struct uart_port *port)
290290
if (sirfport->tx_dma_chan)
291291
sirfsoc_uart_tx_with_dma(sirfport);
292292
else {
293-
sirfsoc_uart_pio_tx_chars(sirfport, 1);
293+
sirfsoc_uart_pio_tx_chars(sirfport,
294+
SIRFSOC_UART_IO_TX_REASONABLE_CNT);
294295
wr_regl(port, ureg->sirfsoc_tx_fifo_op, SIRFUART_FIFO_START);
295296
if (!sirfport->is_marco)
296297
wr_regl(port, ureg->sirfsoc_int_en_reg,

drivers/tty/serial/sirfsoc_uart.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,4 +449,4 @@ struct sirfsoc_uart_port {
449449

450450
/* I/O Mode */
451451
#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

0 commit comments

Comments
 (0)