Re: [PATCH 5/7] dmaengine: sh: rz-dmac: Add suspend to RAM support
From: Claudiu Beznea
Date: Mon Jan 26 2026 - 07:43:48 EST
On 1/26/26 14:10, Biju Das wrote:
-----Original Message-----
From: Claudiu Beznea <claudiu.beznea@xxxxxxxxx>
Sent: 26 January 2026 12:05
To: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>; vkoul@xxxxxxxxxx; Prabhakar Mahadev Lad <prabhakar.mahadev-
lad.rj@xxxxxxxxxxxxxx>; lgirdwood@xxxxxxxxx; broonie@xxxxxxxxxx; perex@xxxxxxxx; tiwai@xxxxxxxx;
p.zabel@xxxxxxxxxxxxxx; geert+renesas@xxxxxxxxx; Fabrizio Castro <fabrizio.castro.jz@xxxxxxxxxxx>
Cc: dmaengine@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; linux-sound@xxxxxxxxxxxxxxx; linux-
renesas-soc@xxxxxxxxxxxxxxx; Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
Subject: Re: [PATCH 5/7] dmaengine: sh: rz-dmac: Add suspend to RAM support
Hi,
On 1/26/26 13:03, Biju Das wrote:
Hi Claudiu,restore the DMA IP registers.
Thanks for the patch.
-----Original Message-----
From: Claudiu <claudiu.beznea@xxxxxxxxx>
Sent: 26 January 2026 10:32
Subject: [PATCH 5/7] dmaengine: sh: rz-dmac: Add suspend to RAM
support
From: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
The Renesas RZ/G3S SoC supports a power saving mode in which power to
most SoC components is turned off, including the DMA IP. Add suspend to RAM support to save and
be the case of a serial device being used with no_console_suspend.
Cyclic DMA channels require special handling. Since they can be
paused and resumed during system suspend and resume, the driver
restores additional registers for these channels during the resume
phase. If a channel was not explicitly paused during suspend, the
driver ensures that it is paused and resumed as part of the system suspend/resume flow. This might
For non-cyclic channels, the dev_pm_ops::prepare callback waits for
all ongoing transfers to complete before allowing suspend-to-RAM to proceed.
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
---
drivers/dma/sh/rz-dmac.c | 183 +++++++++++++++++++++++++++++++++++++--
1 file changed, 175 insertions(+), 8 deletions(-)
diff --git a/drivers/dma/sh/rz-dmac.c b/drivers/dma/sh/rz-dmac.c
index ab5f49a0b9f2..8f3e2719e639
+
+ pm_runtime_put_sync(dmac->dev);
+
+ ret = reset_control_assert(dmac->rstc);
+ if (ret) {
+ pm_runtime_resume_and_get(dmac->dev);
+ rz_dmac_suspend_recover(dmac);
+ }
+
This patch breaks, s2idle in RZ/G3L as it turns off DMA ACLK and IRQ's
are not routed to CPU for wakeup.
Is this particular patch the one that explicitly breaks it? Is there any mainline PM support available
for RZ/G3L? Can it be fixed along with the RZ/G3L support, if any, as I don't have the board to test
it?
Maybe your TF-A is enabling DMAACLK during resume. Can you check that mean time, I will check what you have mentioned
Here?
You used "freeze" in your example. Same did I to check your usecase. That suspend type don't involve TF-A (unless something changes and I'm not aware of).
Thank you,
Claudiu