[PATCH v7 3/3] dmaengine: zynqmp_dma: Add per-channel reset support

From: Golla Nagendra

Date: Thu Dec 03 2026 - 02:40:02 EST


Versal Gen2 and Versal Net expose a dedicated reset line per ZDMA
channel. Trigger a reset pulse during probe using
device_reset_optional().

The binding requires resets for Versal Gen2 and Versal Net and forbids
them for the legacy xlnx,zynqmp-dma-1.0 compatible. Since the same probe
path serves all three, use device_reset_optional() to reset the channel
when a reset is described while allowing legacy devices to continue
probing.

The binding's per-compatible reset requirements are validated by
dtbs_check, so duplicating the compatible-specific check in the driver
is unnecessary.

Signed-off-by: Golla Nagendra <nagendra.golla@xxxxxxx>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xxxxxxx>
Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
---
drivers/dma/xilinx/zynqmp_dma.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
index 3b7dfa53f972..07c3d3d54536 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"

@@ -930,6 +931,11 @@ static int zynqmp_dma_chan_probe(struct zynqmp_dma_device *zdev,
if (IS_ERR(chan->regs))
return PTR_ERR(chan->regs);

+ err = device_reset_optional(&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;

--
2.43.7