@@ -2864,6 +2864,7 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
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;
+ xdev->common.directions |= BIT(DMA_MEM_TO_DEV);
chan->id = xdev->mm2s_chan_id++;
chan->tdest = chan->id;
@@ -2881,6 +2882,7 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
of_device_is_compatible(node,
"xlnx,axi-dma-s2mm-channel")) {
chan->direction = DMA_DEV_TO_MEM;
+ xdev->common.directions |= BIT(DMA_DEV_TO_MEM);
chan->id = xdev->s2mm_chan_id++;
chan->tdest = chan->id - xdev->dma_config->max_channels / 2;
chan->has_vflip = of_property_read_bool(node,
When using the dma_get_slave_caps() API, it checks the directions fields of the dma_device structure. Currently, the Xilinx DMA driver does not set this, which causes dma_get_slave_caps() to return -ENXIO. Fix this issue by setting the directions field of the dma_device structure during DMA channel probe. Signed-off-by: Folker Schwesinger <dev@folker-schwesinger.de> --- drivers/dma/xilinx/xilinx_dma.c | 2 ++ 1 file changed, 2 insertions(+)