]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
dmaengine: xilinx_vdma: Fix issues with non-parking mode
authorKedareswara rao Appana <appana.durga.rao@xilinx.com>
Fri, 26 Feb 2016 14:03:53 +0000 (19:33 +0530)
committerVinod Koul <vinod.koul@intel.com>
Thu, 3 Mar 2016 15:32:38 +0000 (21:02 +0530)
This patch fixes issues with the Non-parking mode(Cirular mode).
With the  existing driver in cirular mode if we submit frames less than h/w
configured we simply end-up having misconfigured vdma h/w.
This patch fixes this issue by configuring the frame count register.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/xilinx/xilinx_vdma.c

index 06bffec934d22d2fb0a3a27bc2ea22978905d1a0..e96ff9dea40da7f37075b1e5704c1a966b46a05a 100644 (file)
@@ -648,6 +648,10 @@ static void xilinx_vdma_start_transfer(struct xilinx_vdma_chan *chan)
        else
                reg &= ~XILINX_VDMA_DMACR_FRAMECNT_EN;
 
+       /* Configure channel to allow number frame buffers */
+       vdma_ctrl_write(chan, XILINX_VDMA_REG_FRMSTORE,
+                       chan->desc_pendingcount);
+
        /*
         * With SG, start with circular mode, so that BDs can be fetched.
         * In direct register mode, if not parking, enable circular mode