]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
Revert "dma: xilinx: Check for channel idle state before submitting dma descriptor"
authorKedareswara rao Appana <appana.durga.rao@xilinx.com>
Sat, 21 Jan 2017 06:02:05 +0000 (11:32 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 24 Jan 2017 15:40:04 +0000 (16:40 +0100)
This reverts commit 8408c1462d9ca03c4aaff660e68b89cb2054bcaa
This patch is specific to vdma added one more patch,
Which will take care of this checks acorss the driver for all
The DMAS(AXI DMA/CDMA/VDMA).

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/dma/xilinx/xilinx_dma.c

index ca429629844ae444b53c8c76aabd0179715e97c8..8288fe4d17c38ec7b3094080bb409392ebaa5651 100644 (file)
@@ -321,7 +321,6 @@ struct xilinx_dma_tx_descriptor {
  * @cyclic: Check for cyclic transfers.
  * @genlock: Support genlock mode
  * @err: Channel has errors
- * @idle: Check for channel idle
  * @tasklet: Cleanup work after irq
  * @config: Device configuration info
  * @flush_on_fsync: Flush on Frame sync
@@ -352,7 +351,6 @@ struct xilinx_dma_chan {
        bool cyclic;
        bool genlock;
        bool err;
-       bool idle;
        struct tasklet_struct tasklet;
        struct xilinx_vdma_config config;
        bool flush_on_fsync;
@@ -968,7 +966,6 @@ static void xilinx_dma_halt(struct xilinx_dma_chan *chan)
                        chan, dma_ctrl_read(chan, XILINX_DMA_REG_DMASR));
                chan->err = true;
        }
-       chan->idle = true;
 }
 
 /**
@@ -1010,9 +1007,6 @@ static void xilinx_vdma_start_transfer(struct xilinx_dma_chan *chan)
        if (chan->err)
                return;
 
-       if (!chan->idle)
-               return;
-
        if (list_empty(&chan->pending_list))
                return;
 
@@ -1116,7 +1110,6 @@ static void xilinx_vdma_start_transfer(struct xilinx_dma_chan *chan)
                vdma_desc_write(chan, XILINX_DMA_REG_VSIZE, last->hw.vsize);
        }
 
-       chan->idle = false;
        if (!chan->has_sg) {
                list_del(&desc->node);
                list_add_tail(&desc->node, &chan->active_list);
@@ -1454,7 +1447,6 @@ static irqreturn_t xilinx_dma_irq_handler(int irq, void *data)
        if (status & XILINX_DMA_DMASR_FRM_CNT_IRQ) {
                spin_lock(&chan->lock);
                xilinx_dma_complete_descriptor(chan);
-               chan->idle = true;
                chan->start_transfer(chan);
                spin_unlock(&chan->lock);
        }
@@ -2335,8 +2327,7 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
        chan->has_sg = xdev->has_sg;
        chan->desc_pendingcount = 0x0;
        chan->ext_addr = xdev->ext_addr;
-       chan->idle = true;
-       
+
        spin_lock_init(&chan->lock);
        INIT_LIST_HEAD(&chan->pending_list);
        INIT_LIST_HEAD(&chan->done_list);