mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] dmaengine: xilinx_dma: Set dma_device directions
@ 2025-05-07 18:21 Thomas Gessler
  2025-05-07 20:31 ` Gupta, Suraj
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Thomas Gessler @ 2025-05-07 18:21 UTC (permalink / raw)
  To: dmaengine
  Cc: linux-kernel, Vinod Koul, Michal Simek, Manivannan Sadhasivam,
	Uwe Kleine-König, Thomas Gessler, Radhey Shyam Pandey,
	Krzysztof Kozlowski, Marek Vasut, linux-arm-kernel, Suraj Gupta,
	Harini Katakam

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@brueckmann-gmbh.de>
---
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)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH v2] dmaengine: xilinx_dma: Set dma_device directions
  2025-05-07 18:21 [PATCH v2] dmaengine: xilinx_dma: Set dma_device directions Thomas Gessler
@ 2025-05-07 20:31 ` Gupta, Suraj
  2025-05-09  5:11 ` Folker Schwesinger
  2025-05-14 15:03 ` Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Gupta, Suraj @ 2025-05-07 20:31 UTC (permalink / raw)
  To: Thomas Gessler, dmaengine
  Cc: linux-kernel, Vinod Koul, Simek, Michal, Manivannan Sadhasivam,
	Uwe Kleine-König, Pandey, Radhey Shyam, Krzysztof Kozlowski,
	Marek Vasut, linux-arm-kernel, Katakam, Harini

[AMD Official Use Only - AMD Internal Distribution Only]

> -----Original Message-----
> From: Thomas Gessler <thomas.gessler@brueckmann-gmbh.de>
> Sent: Wednesday, May 7, 2025 11:51 PM
> To: dmaengine@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org; Vinod Koul <vkoul@kernel.org>; Simek, Michal
> <michal.simek@amd.com>; Manivannan Sadhasivam
> <manivannan.sadhasivam@linaro.org>; Uwe Kleine-König <u.kleine-
> koenig@baylibre.com>; Thomas Gessler <thomas.gessler@brueckmann-gmbh.de>;
> Pandey, Radhey Shyam <radhey.shyam.pandey@amd.com>; Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org>; Marek Vasut <marex@denx.de>; linux-arm-
> kernel@lists.infradead.org; Gupta, Suraj <Suraj.Gupta2@amd.com>; Katakam,
> Harini <harini.katakam@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@brueckmann-gmbh.de>

Reviewed-by: Suraj Gupta <suraj.gupta2@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)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] dmaengine: xilinx_dma: Set dma_device directions
  2025-05-07 18:21 [PATCH v2] dmaengine: xilinx_dma: Set dma_device directions Thomas Gessler
  2025-05-07 20:31 ` Gupta, Suraj
@ 2025-05-09  5:11 ` Folker Schwesinger
  2025-05-14 15:03 ` Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Folker Schwesinger @ 2025-05-09  5:11 UTC (permalink / raw)
  To: Thomas Gessler, dmaengine
  Cc: linux-kernel, Vinod Koul, Michal Simek, Manivannan Sadhasivam,
	Uwe Kleine-König, Radhey Shyam Pandey, Krzysztof Kozlowski,
	Marek Vasut, linux-arm-kernel, Suraj Gupta, Harini Katakam

On Wed May 7, 2025 at 8:21 PM CEST, Thomas Gessler wrote:
> 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@brueckmann-gmbh.de>

Tested-by: Folker Schwesinger <dev@folker-schwesinger.de>

> ---
> 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)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] dmaengine: xilinx_dma: Set dma_device directions
  2025-05-07 18:21 [PATCH v2] dmaengine: xilinx_dma: Set dma_device directions Thomas Gessler
  2025-05-07 20:31 ` Gupta, Suraj
  2025-05-09  5:11 ` Folker Schwesinger
@ 2025-05-14 15:03 ` Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2025-05-14 15:03 UTC (permalink / raw)
  To: dmaengine, Thomas Gessler
  Cc: linux-kernel, Michal Simek, Manivannan Sadhasivam,
	Uwe Kleine-König, Radhey Shyam Pandey, Krzysztof Kozlowski,
	Marek Vasut, linux-arm-kernel, Suraj Gupta, Harini Katakam


On Wed, 07 May 2025 20:21:01 +0200, Thomas Gessler wrote:
> 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.
> 
> 

Applied, thanks!

[1/1] dmaengine: xilinx_dma: Set dma_device directions
      commit: 7e01511443c30a55a5ae78d3debd46d4d872517e

Best regards,
-- 
~Vinod



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-05-14 15:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-07 18:21 [PATCH v2] dmaengine: xilinx_dma: Set dma_device directions Thomas Gessler
2025-05-07 20:31 ` Gupta, Suraj
2025-05-09  5:11 ` Folker Schwesinger
2025-05-14 15:03 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®