ARM: PL011: Add support for Rx DMA buffer polling
A message that is not in the archive (sent off-list or not yet received): 006c01cdefc2$c7e1cb90$57a562b0$@[email protected]
Quoted 14 lines · Chanho Min
In DMA support, Received data is not triggered until the DMA buffer is filled. In order to actually use Rx DMA, We would like to suggest the use of the timer for polling DMA buffer. It makes possible character-level trigger. In our test, no data loss occurred at high-baudrate as compared with interrupt driven (We tested with 3Mbps). We know it will be because of the increased Rx buffer rather than DMA effect. but,It is very useful for high speed uart device. We changes:
-
CONFIG_SERIAL_AMBA_PL011_DMAPOLLis added to select this feature.- add timer and
last_residuefor polling. Every polling, timer handler checks the residue in the dma buffer and transfer data to the tty. Also,last_residueis updated for the next polling.
Quoted 7 lines
- We use consistent DMA mappings instead of streaming DMA mappings to avoid from the frequent cache operation.
-
pl011_dma_rx_charsis modified. the pending size is recalculated because data can be taken by polling.- add module parameter for adjusting polling interval.
Here's the question: what is the effect of having to poll every tick on the overall system?
What I'm getting at is: what is the cost of that polling with DMA enabled over not having DMA on the receive side at all? What is the trade-off vs baud rate? Should we scale the polling interval according to baud rate?