[PATCH] dma: at_hdmac: add device_synchronize callback

From: Rosen Penev

Date: Fri Jul 24 2026 - 19:23:15 EST


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@xxxxxxxxx>
---
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