* [PATCH] dmaengine: ti: edma: support sw triggered chans in of_edma_xlate()
@ 2025-02-16 21:47 Matthew Majewski
2025-02-19 15:06 ` Péter Ujfalusi
2025-03-10 21:06 ` Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: Matthew Majewski @ 2025-02-16 21:47 UTC (permalink / raw)
To: Peter Ujfalusi, Vinod Koul; +Cc: dmaengine, linux-kernel, Matthew Majewski
The .of_edma_xlate() function always sets the hw_triggered flag to
true. This causes sw triggered channels consumed via the device-tree
to not function properly, as the driver incorrectly assumes they are
hw triggered. Modify the xlate() function to correctly set the
hw_triggered flag to false for channels reserved for memcpy
operation (ie, sw triggered).
Signed-off-by: Matthew Majewski <mattwmajewski@gmail.com>
---
drivers/dma/ti/edma.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/ti/edma.c b/drivers/dma/ti/edma.c
index 4ece125b2ae7..0554a18d84ba 100644
--- a/drivers/dma/ti/edma.c
+++ b/drivers/dma/ti/edma.c
@@ -2258,8 +2258,12 @@ static struct dma_chan *of_edma_xlate(struct of_phandle_args *dma_spec,
return NULL;
out:
- /* The channel is going to be used as HW synchronized */
- echan->hw_triggered = true;
+ /*
+ * The channel is going to be HW synchronized, unless it was
+ * reserved as a memcpy channel
+ */
+ echan->hw_triggered =
+ !edma_is_memcpy_channel(i, ecc->info->memcpy_channels);
return dma_get_slave_channel(chan);
}
#else
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: ti: edma: support sw triggered chans in of_edma_xlate()
2025-02-16 21:47 [PATCH] dmaengine: ti: edma: support sw triggered chans in of_edma_xlate() Matthew Majewski
@ 2025-02-19 15:06 ` Péter Ujfalusi
2025-03-10 21:06 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Péter Ujfalusi @ 2025-02-19 15:06 UTC (permalink / raw)
To: Matthew Majewski, Vinod Koul; +Cc: dmaengine, linux-kernel
On 16/02/2025 23:47, Matthew Majewski wrote:
> The .of_edma_xlate() function always sets the hw_triggered flag to
> true. This causes sw triggered channels consumed via the device-tree
> to not function properly, as the driver incorrectly assumes they are
> hw triggered. Modify the xlate() function to correctly set the
> hw_triggered flag to false for channels reserved for memcpy
> operation (ie, sw triggered).
>
> Signed-off-by: Matthew Majewski <mattwmajewski@gmail.com>
Good catch,
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
> ---
> drivers/dma/ti/edma.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/ti/edma.c b/drivers/dma/ti/edma.c
> index 4ece125b2ae7..0554a18d84ba 100644
> --- a/drivers/dma/ti/edma.c
> +++ b/drivers/dma/ti/edma.c
> @@ -2258,8 +2258,12 @@ static struct dma_chan *of_edma_xlate(struct of_phandle_args *dma_spec,
>
> return NULL;
> out:
> - /* The channel is going to be used as HW synchronized */
> - echan->hw_triggered = true;
> + /*
> + * The channel is going to be HW synchronized, unless it was
> + * reserved as a memcpy channel
> + */
> + echan->hw_triggered =
> + !edma_is_memcpy_channel(i, ecc->info->memcpy_channels);
> return dma_get_slave_channel(chan);
> }
> #else
--
Péter
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: ti: edma: support sw triggered chans in of_edma_xlate()
2025-02-16 21:47 [PATCH] dmaengine: ti: edma: support sw triggered chans in of_edma_xlate() Matthew Majewski
2025-02-19 15:06 ` Péter Ujfalusi
@ 2025-03-10 21:06 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2025-03-10 21:06 UTC (permalink / raw)
To: Peter Ujfalusi, Matthew Majewski; +Cc: dmaengine, linux-kernel
On Sun, 16 Feb 2025 16:47:41 -0500, Matthew Majewski wrote:
> The .of_edma_xlate() function always sets the hw_triggered flag to
> true. This causes sw triggered channels consumed via the device-tree
> to not function properly, as the driver incorrectly assumes they are
> hw triggered. Modify the xlate() function to correctly set the
> hw_triggered flag to false for channels reserved for memcpy
> operation (ie, sw triggered).
>
> [...]
Applied, thanks!
[1/1] dmaengine: ti: edma: support sw triggered chans in of_edma_xlate()
commit: e7240aba2053d437a661d946b3d413f310138a45
Best regards,
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-10 21:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-16 21:47 [PATCH] dmaengine: ti: edma: support sw triggered chans in of_edma_xlate() Matthew Majewski
2025-02-19 15:06 ` Péter Ujfalusi
2025-03-10 21:06 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox