[PATCH v2] dmaengine: xilinx_dma: Set dma_device directions

Gupta, Suraj Suraj.Gupta2 at amd.com
Wed May 7 13:31:16 PDT 2025


[AMD Official Use Only - AMD Internal Distribution Only]

> -----Original Message-----
> From: Thomas Gessler <thomas.gessler at brueckmann-gmbh.de>
> Sent: Wednesday, May 7, 2025 11:51 PM
> To: dmaengine at vger.kernel.org
> Cc: linux-kernel at vger.kernel.org; Vinod Koul <vkoul at kernel.org>; Simek, Michal
> <michal.simek at amd.com>; Manivannan Sadhasivam
> <manivannan.sadhasivam at linaro.org>; Uwe Kleine-König <u.kleine-
> koenig at baylibre.com>; Thomas Gessler <thomas.gessler at brueckmann-gmbh.de>;
> Pandey, Radhey Shyam <radhey.shyam.pandey at amd.com>; Krzysztof Kozlowski
> <krzysztof.kozlowski at linaro.org>; Marek Vasut <marex at denx.de>; linux-arm-
> kernel at lists.infradead.org; Gupta, Suraj <Suraj.Gupta2 at amd.com>; Katakam,
> Harini <harini.katakam at amd.com>
> Subject: [PATCH v2] dmaengine: xilinx_dma: Set dma_device directions
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> Coalesce the direction bits from the enabled TX and/or RX channels into the
> directions bit mask of dma_device. Without this mask set,
> dma_get_slave_caps() in the DMAEngine fails, which prevents the driver from being
> used with an IIO DMAEngine buffer.
>
> Signed-off-by: Thomas Gessler <thomas.gessler at brueckmann-gmbh.de>

Reviewed-by: Suraj Gupta <suraj.gupta2 at amd.com>
> ---
> Changes in v2:
>   - Change to Suraj's simpler version as per Radhey's request
>
>  drivers/dma/xilinx/xilinx_dma.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index
> 3ad44afd0e74..8f26b6eff3f3 100644
> --- a/drivers/dma/xilinx/xilinx_dma.c
> +++ b/drivers/dma/xilinx/xilinx_dma.c
> @@ -2909,6 +2909,8 @@ static int xilinx_dma_chan_probe(struct
> xilinx_dma_device *xdev,
>                 return -EINVAL;
>         }
>
> +       xdev->common.directions |= chan->direction;
> +
>         /* Request the interrupt */
>         chan->irq = of_irq_get(node, chan->tdest);
>         if (chan->irq < 0)



More information about the linux-arm-kernel mailing list