Re: [PATCH v5 4/4] dmaengine: zynqmp_dma: Add per-channel reset support

From: Pandey, Radhey Shyam

Date: Fri Nov 06 2026 - 06:13:40 EST


On 11/6/2026 3:40 PM, Golla Nagendra wrote:
Versal Gen2 and Versal Net expose a dedicated reset line per ZDMA
channel. Trigger a reset pulse during probe using device_reset().

For Versal Net and Versal Gen2, reset is a required DT property, so
probe returns an error if the reset property is missing. For legacy
SoCs, the reset path is skipped.

Signed-off-by: Golla Nagendra <nagendra.golla@xxxxxxx>

Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xxxxxxx>
Thanks!

---
drivers/dma/xilinx/zynqmp_dma.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
index cb0eb13f9b05..12696fa44c66 100644
--- a/drivers/dma/xilinx/zynqmp_dma.c
+++ b/drivers/dma/xilinx/zynqmp_dma.c
@@ -19,6 +19,7 @@
#include <linux/clk.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include <linux/pm_runtime.h>
+#include <linux/reset.h>
#include "../dmaengine.h"
@@ -937,6 +938,14 @@ static int zynqmp_dma_chan_probe(struct zynqmp_dma_device *zdev,
if (IS_ERR(chan->regs))
return PTR_ERR(chan->regs);
+ match_data = of_device_get_match_data(&pdev->dev);
+ if (match_data && match_data->has_reset) {
+ err = device_reset(&pdev->dev);
+ if (err)
+ return dev_err_probe(&pdev->dev, err,
+ "failed to reset channel\n");
+ }
+
chan->bus_width = ZYNQMP_DMA_BUS_WIDTH_64;
chan->dst_burst_len = ZYNQMP_DMA_MAX_DST_BURST_LEN;
chan->src_burst_len = ZYNQMP_DMA_MAX_SRC_BURST_LEN;
@@ -952,7 +961,6 @@ static int zynqmp_dma_chan_probe(struct zynqmp_dma_device *zdev,
return -EINVAL;
}
- match_data = of_device_get_match_data(&pdev->dev);
if (match_data)
chan->irq_offset = match_data->offset;