summaryrefslogtreecommitdiffstats
path: root/drivers/dma/mv_xor.h
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2013-10-29 08:47:49 +0100
committerVinod Koul <vinod.koul@intel.com>2013-11-13 15:38:31 +0530
commit2dcbdce3610a1ba190a74b782b9f7f1f7f976325 (patch)
tree07919623feae644abd4148a7b0424c4c1e5416e1 /drivers/dma/mv_xor.h
parentbb3660f130996d2653f123ee1ad802f11adbfb1c (diff)
downloadlinux-2dcbdce3610a1ba190a74b782b9f7f1f7f976325.tar.gz
linux-2dcbdce3610a1ba190a74b782b9f7f1f7f976325.tar.bz2
linux-2dcbdce3610a1ba190a74b782b9f7f1f7f976325.zip
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>
Diffstat (limited to 'drivers/dma/mv_xor.h')
0 files changed, 0 insertions, 0 deletions