]> rtime.felk.cvut.cz Git - vajnamar/linux-xlnx.git/commitdiff
dmaengine: xilinx: Use different channel names for each dma
authorKedareswara rao Appana <appana.durga.rao@xilinx.com>
Fri, 24 Jun 2016 05:21:26 +0000 (10:51 +0530)
committerVinod Koul <vinod.koul@intel.com>
Fri, 8 Jul 2016 05:21:49 +0000 (10:51 +0530)
Current driver assumes that child node channel name is either
"xlnx,axi-vdma-mm2s-channel" or "xlnx,axi-vdma-s2mm-channel"
which is confusing the users of AXI DMA and CDMA.
This patch fixes this issue by using different channel
names for the AXI DMA and AXI CDMA child nodes.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
drivers/dma/xilinx/xilinx_dma.c

index 0faa189444343d44ae346bfa3387be92d110c1c8..a2b8bfaec43cc12654175f22494e3ddbd8f818cf 100644 (file)
@@ -50,8 +50,12 @@ Optional properties for VDMA:
        {3}, flush s2mm channel
 
 Required child node properties:
-- compatible: It should be either "xlnx,axi-vdma-mm2s-channel" or
+- compatible:
+       For VDMA: It should be either "xlnx,axi-vdma-mm2s-channel" or
        "xlnx,axi-vdma-s2mm-channel".
+       For CDMA: It should be "xlnx,axi-cdma-channel".
+       For AXIDMA: It should be either "xlnx,axi-dma-mm2s-channel" or
+       "xlnx,axi-dma-s2mm-channel".
 - interrupts: Should contain per channel VDMA interrupts.
 - xlnx,datawidth: Should contain the stream data width, take values
        {32,64...1024}.
index 0768d9f783c964d08af97e063244e88f4a5accc4..cf47347a1bc6b947b1f3cca2d78fa26ab54835bd 100644 (file)
@@ -2353,7 +2353,9 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
        if (!has_dre)
                xdev->common.copy_align = fls(width - 1);
 
-       if (of_device_is_compatible(node, "xlnx,axi-vdma-mm2s-channel")) {
+       if (of_device_is_compatible(node, "xlnx,axi-vdma-mm2s-channel") ||
+           of_device_is_compatible(node, "xlnx,axi-dma-mm2s-channel") ||
+           of_device_is_compatible(node, "xlnx,axi-cdma-channel")) {
                chan->direction = DMA_MEM_TO_DEV;
                chan->id = chan_id;
                chan->tdest = chan_id;
@@ -2367,7 +2369,9 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
                                chan->flush_on_fsync = true;
                }
        } else if (of_device_is_compatible(node,
-                                           "xlnx,axi-vdma-s2mm-channel")) {
+                                          "xlnx,axi-vdma-s2mm-channel") ||
+                  of_device_is_compatible(node,
+                                          "xlnx,axi-dma-s2mm-channel")) {
                chan->direction = DMA_DEV_TO_MEM;
                chan->id = chan_id;
                chan->tdest = chan_id - xdev->nr_channels;