mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 15:11:50 +00:00
9934075471
This DMA driver is used by 8250-omap on DRA7-evm. There is one requirement that is to pause a transfer. This is currently used on the RX side. It is possible that the UART HW aborted the RX (UART's RX-timeout) but the DMA controller starts the transfer shortly after. Before we can manually purge the FIFO we need to pause the transfer, check how many bytes it already received and terminate the transfer without it making any progress. From testing on the TX side it seems that it is possible that we invoke pause once the transfer has completed which is indicated by the missing CCR_ENABLE bit but before the interrupt has been noticed. In that case the interrupt will come even after disabling it. The AM572x manual says that we have to wait for the CCR_RD_ACTIVE & CCR_WR_ACTIVE bits to be gone before programming it again here is the drain loop. Also it looks like without the drain the TX-transfer makes sometimes progress. One note: The pause + resume combo is broken because after resume the the complete transfer will be programmed again. That means the already transferred bytes (until the pause event) will be sent again. This is currently not important for my UART user because it does only pause + terminate. v3…v4: - update subject line. v2…v3: - rephrase the comment based on Russell's information / feedback. v1…v2: - move the drain loop into omap_dma_drain_chan() instead of having it twice. - allow pause only for DMA_DEV_TO_MEM transfers if non-cyclic. Add a comment why DMA_MEM_TO_DEV not allowed. - clear pause on terminate_all. Otherwise pause() + terminate_all() will keep the pause bit set and we can't pause the following transfer. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> [vigneshr@ti.com: drain channel only when buffering is on, rebase to v4.8] Signed-off-by: Vignesh R <vigneshr@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> |
||
---|---|---|
.. | ||
bestcomm | ||
dw | ||
hsu | ||
ioat | ||
ipu | ||
ppc4xx | ||
qcom | ||
sh | ||
xilinx | ||
acpi-dma.c | ||
amba-pl08x.c | ||
at_hdmac_regs.h | ||
at_hdmac.c | ||
at_xdmac.c | ||
bcm2835-dma.c | ||
coh901318_lli.c | ||
coh901318.c | ||
coh901318.h | ||
cppi41.c | ||
dma-axi-dmac.c | ||
dma-jz4740.c | ||
dma-jz4780.c | ||
dmaengine.c | ||
dmaengine.h | ||
dmatest.c | ||
edma.c | ||
ep93xx_dma.c | ||
fsl_raid.c | ||
fsl_raid.h | ||
fsl-edma.c | ||
fsldma.c | ||
fsldma.h | ||
idma64.c | ||
idma64.h | ||
img-mdc-dma.c | ||
imx-dma.c | ||
imx-sdma.c | ||
iop-adma.c | ||
k3dma.c | ||
Kconfig | ||
lpc18xx-dmamux.c | ||
Makefile | ||
mic_x100_dma.c | ||
mic_x100_dma.h | ||
mmp_pdma.c | ||
mmp_tdma.c | ||
moxart-dma.c | ||
mpc512x_dma.c | ||
mv_xor_v2.c | ||
mv_xor.c | ||
mv_xor.h | ||
mxs-dma.c | ||
nbpfaxi.c | ||
of-dma.c | ||
omap-dma.c | ||
pch_dma.c | ||
pl330.c | ||
pxa_dma.c | ||
s3c24xx-dma.c | ||
sa11x0-dma.c | ||
sirf-dma.c | ||
ste_dma40_ll.c | ||
ste_dma40_ll.h | ||
ste_dma40.c | ||
stm32-dma.c | ||
sun4i-dma.c | ||
sun6i-dma.c | ||
tegra20-apb-dma.c | ||
tegra210-adma.c | ||
ti-dma-crossbar.c | ||
timb_dma.c | ||
TODO | ||
txx9dmac.c | ||
txx9dmac.h | ||
virt-dma.c | ||
virt-dma.h | ||
xgene-dma.c | ||
zx296702_dma.c |