kernel-ark/drivers/dma
Markus Pargmann 2dcbdce361 dma: mxs-dma: Use semaphores for cyclic DMA
mxs dma channel hardware reset command is not reliable and can cause
a channel stall. The only way to fix the channel stall is a DMA engine
reset.

To avoid channel resets we use the hardware semaphore counter. For each
transmitted segment, the DMA channel will decrease the counter by one.
To use this mechanism with cyclic DMA, we need to increase the semaphore
counter with each completed DMA command in the interrupt handler. To
avoid any interruptions between the DMA transfers, the semaphore counter
is initialized with 2. This way the counter can be increased in the
interrupt handler without an influence on the transfer of the DMA
engine.

When disabling the channel, we stop increasing the semaphore counter in
the interrupt handler.

This patch was tested on i.MX28 with the SAIF DMA channel.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2013-11-13 15:38:31 +05:30
..
bestcomm Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-02-23 17:09:55 -08:00
dw dmaengine: dw: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:00 +05:30
ioat dmaengine: ioat: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:05 +05:30
ipu dmaengine: ipu: fix warnings from 64-bit dma_addr_t printouts 2013-11-13 14:10:48 +05:30
ppc4xx dmaengine: ppc4xx: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:12 +05:30
sh Merge branch 'dma_complete' into next 2013-10-30 15:42:19 +05:30
acpi-dma.c acpi-dma: remove ugly conversion 2013-08-25 16:43:45 +05:30
amba-pl08x.c dmaengine: amba-pl08x: use DMA_COMPLETE for dma completion status 2013-10-25 11:15:54 +05:30
at_hdmac_regs.h DMA: AT91: Get residual bytes in dma buffer 2013-07-05 11:40:31 +05:30
at_hdmac.c dmaengine: at_hdma: use DMA_COMPLETE for dma completion status 2013-10-25 11:15:55 +05:30
coh901318_lli.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-02-26 09:24:48 -08:00
coh901318.c dmaengine: coh901318: use DMA_COMPLETE for dma completion status 2013-10-25 11:15:56 +05:30
coh901318.h dma: coh901318: merge header files 2013-01-07 17:36:37 +01:00
cppi41.c dma: cppi41: return code > 0 of pm_runtime_get_sync() is not an error 2013-11-12 14:28:25 +05:30
dma-jz4740.c dmaengine: jz4740: use DMA_COMPLETE for dma completion status 2013-10-25 11:15:58 +05:30
dmaengine.c dmaengine: use DMA_COMPLETE for dma completion status 2013-10-25 11:15:38 +05:30
dmaengine.h
dmatest.c dmaengine: dmatest: use DMA_COMPLETE for dma completion status 2013-10-25 11:15:59 +05:30
edma.c dmaengine: edma: remove duplicate kfree 2013-11-13 14:10:20 +05:30
ep93xx_dma.c ep93xx_dma: remove useless use of lock 2013-08-05 09:32:24 +05:30
fsldma.c DMA: Freescale: update driver to support 8-channel DMA engine 2013-11-13 14:26:27 +05:30
fsldma.h DMA: Freescale: update driver to support 8-channel DMA engine 2013-11-13 14:26:27 +05:30
imx-dma.c Merge branch 'for-linus' into next 2013-10-31 22:36:13 +05:30
imx-sdma.c dma: imx-sdma: Fix warnings for LPAE builds 2013-11-13 14:10:48 +05:30
intel_mid_dma_regs.h dma: fix comments 2012-09-01 08:57:12 -07:00
intel_mid_dma.c dmaengine: intel_mid_dma: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:04 +05:30
iop-adma.c dmaengine: iop: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:06 +05:30
iovlock.c
k3dma.c dmaengine: k3dma: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:07 +05:30
Kconfig DMA: Freescale: update driver to support 8-channel DMA engine 2013-11-13 14:26:27 +05:30
Makefile Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2013-09-10 13:37:36 -07:00
mmp_pdma.c dma: misc: remove deprecated IRQF_DISABLED 2013-10-13 20:21:35 +05:30
mmp_tdma.c dmaengine: mmp_tdma: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:08 +05:30
mpc512x_dma.c mpc512x_dma: remove useless use of lock 2013-08-05 09:32:25 +05:30
mv_xor.c dmaengine: mv_xor: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:09 +05:30
mv_xor.h mv_xor: support big endian systems using descriptor swap feature 2013-08-22 22:57:37 -07:00
mxs-dma.c dma: mxs-dma: Use semaphores for cyclic DMA 2013-11-13 15:38:31 +05:30
of-dma.c dma: of: make error message more meaningful by adding the node name 2013-08-19 14:45:05 +05:30
omap-dma.c dmaengine: omap: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:11 +05:30
pch_dma.c pch_dma: Add MODULE_DEVICE_TABLE 2013-09-02 11:59:58 +05:30
pl330.c dma: pl330: Remove unnecessary amba_set_drvdata() 2013-10-31 19:54:10 +05:30
sa11x0-dma.c dmaengine: sa11x0: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:13 +05:30
sirf-dma.c dmaengine: sirf: add PM entries for sleep and runtime 2013-08-13 17:01:01 +05:30
ste_dma40_ll.c dmaengine: ste_dma40_ll: Replace meaningless register set with comment 2013-06-04 11:12:10 +02:00
ste_dma40_ll.h dmaengine: ste_dma40: Remove unnecessary call to d40_phy_cfg() 2013-05-23 21:13:19 +02:00
ste_dma40.c dmaengine: ste: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:15 +05:30
tegra20-apb-dma.c dmaengine: tegra: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:16 +05:30
timb_dma.c dma: use dev_get_platdata() 2013-08-13 16:56:41 +05:30
TODO
txx9dmac.c dmaengine: txx9: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:17 +05:30
txx9dmac.h
virt-dma.c dmaengine: virt-dma: add support for cyclic DMA periodic callbacks 2012-07-01 14:15:23 +01:00
virt-dma.h dmaengine: virt-dma: add support for cyclic DMA periodic callbacks 2012-07-01 14:15:23 +01:00