Commit 96d5d884 authored by Matthew Murrian's avatar Matthew Murrian Committed by Vinod Koul
Browse files

dmaengine: xilinx_dma: Fix SG capability check for MCDMA



The SG capability is inherently present with Multichannel DMA operation.
The register used to check for this capability with other DMA driver types
is not defined for MCDMA.

Fixes: 6ccd692b ("dmaengine: xilinx_dma: Add Xilinx AXI MCDMA Engine driver support")
Signed-off-by: default avatarMatthew Murrian <matthew.murrian@goctsi.com>
Signed-off-by: default avatarRadhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Link: https://lore.kernel.org/r/1604473206-32573-4-git-send-email-radhey.shyam.pandey@xilinx.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent c8ae7932
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2855,9 +2855,10 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
		chan->stop_transfer = xilinx_dma_stop_transfer;
	}

	/* check if SG is enabled (only for AXIDMA and CDMA) */
	/* check if SG is enabled (only for AXIDMA, AXIMCDMA, and CDMA) */
	if (xdev->dma_config->dmatype != XDMA_TYPE_VDMA) {
		if (dma_ctrl_read(chan, XILINX_DMA_REG_DMASR) &
		if (xdev->dma_config->dmatype == XDMA_TYPE_AXIMCDMA ||
		    dma_ctrl_read(chan, XILINX_DMA_REG_DMASR) &
			    XILINX_DMA_DMASR_SG_MASK)
			chan->has_sg = true;
		dev_dbg(chan->dev, "ch %d: SG %s\n", chan->id,