* [PATCH] dma: at_hdmac: add device_synchronize callback
@ 2026-07-24 23:23 Rosen Penev
0 siblings, 0 replies; only message in thread
From: Rosen Penev @ 2026-07-24 23:23 UTC (permalink / raw)
To: dmaengine
Cc: Ludovic Desroches, Vinod Koul, Frank Li,
moderated list:MICROCHIP AT91 DMA DRIVERS, open list
Implement the device_synchronize callback for the atmel
DMA driver by adding atc_synchronize() which calls
vchan_synchronize() on the associated virt channel.
This ensures proper synchronization of pending descriptors
when requested by the DMA framework.
Assisted-by: OpenCode:Big-Pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/dma/at_hdmac.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index bb501c0baa7e..d587f5809814 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -1617,6 +1617,13 @@ static int atc_resume(struct dma_chan *chan)
return 0;
}
+static void atc_synchronize(struct dma_chan *chan)
+{
+ struct at_dma_chan *atchan = to_at_dma_chan(chan);
+
+ vchan_synchronize(&atchan->vc);
+}
+
static int atc_terminate_all(struct dma_chan *chan)
{
struct at_dma_chan *atchan = to_at_dma_chan(chan);
@@ -2040,6 +2047,7 @@ static int __init at_dma_probe(struct platform_device *pdev)
atdma->dma_device.device_free_chan_resources = atc_free_chan_resources;
atdma->dma_device.device_tx_status = atc_tx_status;
atdma->dma_device.device_issue_pending = atc_issue_pending;
+ atdma->dma_device.device_synchronize = atc_synchronize;
atdma->dma_device.dev = &pdev->dev;
/* set prep routines based on capability */
--
2.55.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-24 23:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-24 23:23 [PATCH] dma: at_hdmac: add device_synchronize callback Rosen Penev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox