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 v3 15/18] dmaengine: ste_dma40: Use power domain for LCLA SRAM
Date: Mon, 21 Sep 2026 11:36:09 -0500 [thread overview]
Message-ID: <arFc-cyOEESzVnWn@SMW015318> (raw)
In-Reply-To: <20260921-ux500-power-domains-v7-1-v3-15-9352be6b86b1@kernel.org>
On Mon, Sep 21, 2026 at 12:48:21AM +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. The DMA controller is
> runtime PM IRQ-safe, so keep taking explicit LCLA runtime PM references
> from the descriptor preparation path instead of relying on a runtime PM
> device link from the atomic transfer path.
>
> Add a stateless device link so system PM keeps the DMA controller ordered
> after the LCLA SRAM supplier.
>
> Suggested-by: Frank Li <Frank.li@oss.nxp.com>
> Assisted-by: LLM
> Signed-off-by: Linus Walleij <linusw@kernel.org>
> ---
> drivers/dma/ste_dma40.c | 130 ++++++++++++++++++++++++++++++++----------------
> 1 file changed, 88 insertions(+), 42 deletions(-)
>
> diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
> index eda3f91741ed..2841af5b160b 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"
> @@ -383,6 +383,7 @@ struct d40_lli_pool {
> * @node: List entry.
> * @is_in_client_list: true if the client owns this descriptor.
> * @cyclic: true if this is a cyclic job
> + * @lcla_pm_active: LCLA SRAM power domain is held for this descriptor.
> *
> * This descriptor is used for both logical and physical transfers.
> */
> @@ -402,6 +403,7 @@ struct d40_desc {
>
> bool is_in_client_list;
> bool cyclic;
> + bool lcla_pm_active;
> };
>
> /**
> @@ -571,7 +573,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_link: Device link to keep system PM ordered against LCLA.
> * @phy_res: Vector containing all physical channels.
> * @lcla_pool: lcla pool settings and data.
> * @lcpa_base: The virtual mapped address of LCPA.
> @@ -606,7 +609,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;
> + struct device_link *lcla_link;
> /* Physical half channels */
> struct d40_phy_res *phy_res;
> struct d40_lcla_pool lcla_pool;
> @@ -628,6 +632,36 @@ static struct device *chan2dev(struct d40_chan *d40c)
> return &d40c->chan.dev->device;
> }
>
> +static void d40_transfer_runtime_get(struct d40_base *base)
> +{
> + pm_runtime_get_sync(base->dev);
should use pm_runtime_resume_and_get() also? avoid need call
pm_runtime_put_noidle() to maintance ref count.
pm_runtime_get_sync() many return failure, why needn't check return value
here.
Frank
> +}
> +
> +static int d40_lcla_runtime_get(struct d40_base *base)
> +{
> + if (!base->lcla_dev)
> + return 0;
> +
> + return pm_runtime_resume_and_get(base->lcla_dev);
> +}
> +
next prev parent reply other threads:[~2026-09-21 16:36 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-20 22:48 [PATCH v3 00/18] pmdomain: st: ux500: Implement ux500 power domains Linus Walleij
2026-09-20 22:48 ` [PATCH v3 01/18] dt-bindings: power: Convert Ux500 PM domains to schema Linus Walleij
2026-09-28 5:37 ` Krzysztof Kozlowski
2026-09-20 22:48 ` [PATCH v3 02/18] dt-bindings: arm: ux500: Drop NR_DOMAINS Linus Walleij
2026-09-20 22:48 ` [PATCH v3 03/18] dt-bindings: arm: Add the actual power domains on U8500 Linus Walleij
2026-09-20 22:48 ` [PATCH v3 04/18] dt-bindings: mfd: db8500-prcmu: Deprecate EPOD regulators Linus Walleij
2026-09-20 22:48 ` [PATCH v3 05/18] dt-bindings: display: ste,mcde: Allow power domains Linus Walleij
2026-10-08 17:41 ` Rob Herring
2026-09-20 22:48 ` [PATCH v3 06/18] pmdomain: st: ux500: Implement more " Linus Walleij
2026-09-20 22:48 ` [PATCH v3 07/18] ARM: dts: ux500: Rename power domains node Linus Walleij
2026-09-20 22:48 ` [PATCH v3 08/18] dt-bindings: clock: stericsson,u8500-clks: Allow power domains Linus Walleij
2026-09-20 22:48 ` [PATCH v3 09/18] dt-bindings: timer: arm,twd-timer: " Linus Walleij
2026-09-20 22:48 ` [PATCH v3 10/18] dt-bindings: watchdog: arm,twd-wdt: " Linus Walleij
2026-09-20 22:48 ` [PATCH v3 11/18] ARM: dts: ux500: Add " Linus Walleij
2026-09-20 23:04 ` sashiko-bot
2026-09-20 22:48 ` [PATCH v3 12/18] pmdomain: st: ux500: Control DB8500 EPODs Linus Walleij
2026-09-20 23:04 ` sashiko-bot
2026-09-24 13:44 ` Ulf Hansson
2026-09-20 22:48 ` [PATCH v3 13/18] drm/mcde: Use power domain for display power Linus Walleij
2026-09-20 22:58 ` sashiko-bot
2026-09-20 22:48 ` [PATCH v3 14/18] misc: sram: Enable runtime PM Linus Walleij
2026-09-20 23:02 ` sashiko-bot
2026-09-20 22:48 ` [PATCH v3 15/18] dmaengine: ste_dma40: Use power domain for LCLA SRAM Linus Walleij
2026-09-20 23:03 ` sashiko-bot
2026-09-21 16:36 ` Frank Li [this message]
2026-09-24 13:26 ` Ulf Hansson
2026-09-30 20:15 ` Frank Li
2026-10-06 13:21 ` Vinod Koul
2026-09-20 22:48 ` [PATCH v3 16/18] mfd/regulator: db8500-prcmu: Remove EPOD regulators Linus Walleij
2026-09-20 22:48 ` [PATCH v3 17/18] dt-bindings: display: ste,mcde: Deprecate EPOD supply Linus Walleij
2026-09-20 23:00 ` sashiko-bot
2026-09-20 22:48 ` [PATCH v3 18/18] ARM: dts: ux500: Remove DB8500 EPOD regulators Linus Walleij
2026-09-20 23:05 ` sashiko-bot
2026-09-21 7:06 ` Linus Walleij
2026-10-06 10:30 ` [PATCH v3 00/18] pmdomain: st: ux500: Implement ux500 power domains Linus Walleij
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=arFc-cyOEESzVnWn@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