Skip to content

Commit f3cb675

Browse files
P33Mpelwell
authored andcommitted
tty/serial: pl011: restrict RX burst FIFO threshold
If the associated DMA controller has lower burst length support than the level the FIFO is set to, then bytes will be left in the RX FIFO at the end of a DMA block - requiring a round-trip through the timeout interrupt handler rather than an end-of-block DMA interrupt. Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
1 parent 1c4c909 commit f3cb675

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/tty/serial/amba-pl011.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,12 @@ static void pl011_dma_probe(struct uart_amba_port *uap)
487487
"RX DMA disabled - no residue processing\n");
488488
return;
489489
}
490+
/*
491+
* DMA controllers with smaller burst capabilities than 1/4
492+
* the FIFO depth will leave more bytes than expected in the
493+
* RX FIFO if mismatched.
494+
*/
495+
rx_conf.src_maxburst = min(caps.max_burst, rx_conf.src_maxburst);
490496
}
491497
dmaengine_slave_config(chan, &rx_conf);
492498
uap->dmarx.chan = chan;

0 commit comments

Comments
 (0)