Skip to content

Commit 96d5d88

Browse files
Matthew Murrianvinodkoul
authored andcommitted
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: 6ccd692 ("dmaengine: xilinx_dma: Add Xilinx AXI MCDMA Engine driver support") Signed-off-by: Matthew Murrian <matthew.murrian@goctsi.com> Signed-off-by: Radhey 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: Vinod Koul <vkoul@kernel.org>
1 parent c8ae793 commit 96d5d88

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

drivers/dma/xilinx/xilinx_dma.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2855,10 +2855,11 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
28552855
chan->stop_transfer = xilinx_dma_stop_transfer;
28562856
}
28572857

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

0 commit comments

Comments
 (0)