]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dmaengine: xilinx: fix device_terminate_all() callback for AXI CDMA
authorAkinobu Mita <akinobu.mita@gmail.com>
Mon, 13 Mar 2017 15:59:11 +0000 (00:59 +0900)
committerVinod Koul <vinod.koul@intel.com>
Tue, 14 Mar 2017 10:44:29 +0000 (16:14 +0530)
commit676f9c26c330d087125769200bcf080c3c88488e
treee14d8f15528e5d452565b54835924fcc46aabb86
parentc1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201
dmaengine: xilinx: fix device_terminate_all() callback for AXI CDMA

The device_terminate_all() callback for this driver stops current DMA
operations by clearing RUNSTOP bit in the control register and waiting
HALTED bit set in the status register.

But AXI CDMA which is one of the supported DMA engine by this driver
does not provide the run / stop controls and those bits in the control
and status registers are reserved.  So when device_terminate_all() is
called, the error message is printed and the channel is marked as having
errors in xilinx_dma_halt().

This change adds stop_transfer() callback which differentiates CDMA and
other DMA engine.  The CDMA's one avoids the unsupported operations and
instead polls the status register to check if the DMA operations are in
progress for AXI CDMA.

Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Kedareswara rao Appana <appana.durga.rao@xilinx.com>
Cc: Michal Simek <monstr@monstr.eu>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/xilinx/xilinx_dma.c