From: Frank Li <Frank.li@oss.nxp.com>
To: Linus Walleij <linusw@kernel.org>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Ulf Hansson <ulfh@kernel.org>,
Mark Brown <broonie@kernel.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
Lee Jones <lee@kernel.org>,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
linux-pm@vger.kernel.org, dri-devel@lists.freedesktop.org,
dmaengine@vger.kernel.org
Subject: Re: [PATCH 08/11] dmaengine: ste_dma40: Use power domain for LCLA SRAM
Date: Thu, 18 Jun 2026 13:23:22 -0500 [thread overview]
Message-ID: <ajQ3mphsfF9esl-M@SMW015318> (raw)
In-Reply-To: <20260618-ux500-power-domains-v7-1-v1-8-eb5e50b1a588@kernel.org>
On Thu, Jun 18, 2026 at 07:00:54AM +0200, Linus Walleij wrote:
> Replace the LCLA ESRAM regulator with runtime PM.
>
> Use the SRAM device that owns the ESRAM34 power domain.
>
> Hold that domain while DMA transfers are active.
>
> Assisted-by: Codex:gpt-5-5
> Signed-off-by: Linus Walleij <linusw@kernel.org>
> ---
> drivers/dma/ste_dma40.c | 97 ++++++++++++++++++++++++++++---------------------
> 1 file changed, 55 insertions(+), 42 deletions(-)
>
> diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
> index 9b803c0aec25..6ca67ec446dc 100644
> --- a/drivers/dma/ste_dma40.c
> +++ b/drivers/dma/ste_dma40.c
> @@ -21,8 +21,8 @@
> #include <linux/of.h>
> #include <linux/of_address.h>
> #include <linux/of_dma.h>
> +#include <linux/of_platform.h>
> #include <linux/amba/bus.h>
> -#include <linux/regulator/consumer.h>
>
> #include "dmaengine.h"
> #include "ste_dma40.h"
> @@ -571,7 +571,8 @@ struct d40_gen_dmac {
> * to phy_chans entries.
> * @plat_data: Pointer to provided platform_data which is the driver
> * configuration.
> - * @lcpa_regulator: Pointer to hold the regulator for the esram bank for lcla.
> + * @lcla_dev: SRAM device for the ESRAM bank used by LCLA.
> + * @lcla_pm_enabled: Whether runtime PM was enabled for LCLA by this driver.
> * @phy_res: Vector containing all physical channels.
> * @lcla_pool: lcla pool settings and data.
> * @lcpa_base: The virtual mapped address of LCPA.
> @@ -607,7 +608,8 @@ struct d40_base {
> struct d40_chan **lookup_log_chans;
> struct d40_chan **lookup_phy_chans;
> struct stedma40_platform_data *plat_data;
> - struct regulator *lcpa_regulator;
> + struct device *lcla_dev;
> + bool lcla_pm_enabled;
> /* Physical half channels */
> struct d40_phy_res *phy_res;
> struct d40_lcla_pool lcla_pool;
> @@ -628,6 +630,22 @@ static struct device *chan2dev(struct d40_chan *d40c)
> return &d40c->chan.dev->device;
> }
>
> +static void d40_transfer_runtime_get(struct d40_base *base)
> +{
> + if (base->lcla_dev)
> + pm_runtime_get_sync(base->lcla_dev);
> +
> + pm_runtime_get_sync(base->dev);
Suggest create device link between base->dev and base->lcla_dev, so run
time pm framework will auto do it for you
Ref: https://lore.kernel.org/imx/20260513-b4-b4-edma-runtime-opt-v5-4-1e595bfb8423@nxp.com/
Frank
next prev parent reply other threads:[~2026-06-18 18:23 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-18 5:00 [PATCH 00/11] pmdomain: st: ux500: Implement ux500 power domains Linus Walleij
2026-06-18 5:00 ` [PATCH 01/11] dt-bindings: power: Convert Ux500 PM domains to schema Linus Walleij
2026-06-18 5:07 ` sashiko-bot
2026-06-18 16:51 ` Rob Herring (Arm)
2026-06-18 5:00 ` [PATCH 02/11] dt-bindings: Add the actual power domains on U8500 Linus Walleij
2026-06-18 5:00 ` [PATCH 03/11] pmdomain: st: ux500: Implement more power domains Linus Walleij
2026-06-18 5:10 ` sashiko-bot
2026-06-18 5:00 ` [PATCH 04/11] ARM: dts: ux500: Rename power domains node Linus Walleij
2026-06-18 5:00 ` [PATCH 05/11] ARM: dts: ux500: Add power domains Linus Walleij
2026-06-18 5:14 ` sashiko-bot
2026-06-18 5:00 ` [PATCH 06/11] pmdomain: st: ux500: Control DB8500 EPODs Linus Walleij
2026-06-18 5:14 ` sashiko-bot
2026-06-18 5:00 ` [PATCH 07/11] drm/mcde: Use power domain for display power Linus Walleij
2026-06-18 5:11 ` sashiko-bot
2026-06-18 5:00 ` [PATCH 08/11] dmaengine: ste_dma40: Use power domain for LCLA SRAM Linus Walleij
2026-06-18 5:15 ` sashiko-bot
2026-06-18 18:23 ` Frank Li [this message]
2026-06-18 5:00 ` [PATCH 09/11] regulator: db8500-prcmu: Remove EPOD regulators Linus Walleij
2026-06-18 5:15 ` sashiko-bot
2026-06-18 5:00 ` [PATCH 10/11] regulator: db8500: Add power domain regulators Linus Walleij
2026-06-18 5:23 ` sashiko-bot
2026-06-18 5:00 ` [PATCH 11/11] ARM: dts: ux500: Remove DB8500 EPOD regulators Linus Walleij
2026-06-18 7:20 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ajQ3mphsfF9esl-M@SMW015318 \
--to=frank.li@oss.nxp.com \
--cc=Frank.Li@kernel.org \
--cc=airlied@gmail.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=ulfh@kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox