Skip to content
Commit a7823395 authored by Larisa Grigore's avatar Larisa Grigore Committed by Zhantao Tang
Browse files

tty: serial: linflexuart: UART support for FIFO with DMA

commit 96e078dfd6537ad3069ef0ea2f708e2836cc6754 from
https://github.com/nxp-auto-linux/linux



Add Linflex FIFO support with DMA to avoid generating one interrupt per
character and losing characters while copy-paste.
If the edma is not enabled, the Linflex driver will fallback to BufferMode.

tty: serial: linflexuart: Fix memory corruption in fsl_linflexuart

The memory is corrupted when UART is using DMA. The issue is easily
seen when the SLUB allocator is used and that affects the RT patch.
The memory is corrupted in linflex_dma_tx_complete, when calling
async_tx_ack because the function modifies the memory freed in
fsl_edma_free_desc.
DMA_CTRL_ACK, if cleared, the descriptor cannot be reused by provider
until the client sends ack, i.e. has a chance to establish any dependency
chains. In our case, we don't need the descriptor after completion so
we can set the flag in dmaengine_prep_slave_single.

Issue: ALB-57
Issue: ALB-448
Issue: ALB-9101
Signed-off-by: default avatarStoica Cosmin-Stefan <cosmin.stoica@nxp.com>
Signed-off-by: default avatarLarisa Grigore <Larisa.Grigore@nxp.com>
Signed-off-by: default avatarRadu Pirea <radu-nicolae.pirea@nxp.com>
Signed-off-by: default avatarZhantao Tang <zhantao.tang@windriver.com>
parent f6d5b5c8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment