From: Eric Chan <ericchancf@google.com>
To: Suzuki K Poulose <suzuki.poulose@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Mike Leach <mike.leach@linaro.org>,
James Clark <james.clark@linaro.org>, Leo Yan <leo.yan@arm.com>,
Anshuman Khandual <anshuman.khandual@arm.com>,
Sudeep Holla <sudeep.holla@kernel.org>,
coresight@lists.linaro.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Eric Chan <ericchancf@google.com>
Subject: [PATCH 1/2] coresight: Add missing dev_pm_ops to AMBA drivers
Date: Thu, 10 Sep 2026 14:51:06 +0000 [thread overview]
Message-ID: <20260910145107.3640991-2-ericchancf@google.com> (raw)
In-Reply-To: <20260910145107.3640991-1-ericchancf@google.com>
When ACPI or MMIO platform driver support was added for TMC, CATU, and
ETM4x, runtime PM support was hooked up for their platform drivers via
respective dev_pm_ops, but setting the .pm pointer in their AMBA drivers
was missed.
As a result, when these devices are probed via the AMBA bus, runtime
power management does not invoke their runtime suspend/resume callbacks,
leaving device clocks (such as atclk and pclk) unmanaged during runtime
PM transitions.
Move the AMBA drivers next to their platform drivers and hook up
dev_pm_ops to their drv.pm pointers across TMC, CATU, and ETM4x.
Fixes: 70750e257aab ("coresight: tmc: Move ACPI support from AMBA driver to platform driver")
Fixes: 23567323857d ("coresight: catu: Move ACPI support from AMBA driver to platform driver")
Fixes: 73d779a03a76 ("coresight: etm4x: Change etm4_platform_driver driver for MMIO devices")
Cc: stable@vger.kernel.org
Signed-off-by: Eric Chan <ericchancf@google.com>
---
drivers/hwtracing/coresight/coresight-catu.c | 21 +++++++++--------
.../coresight/coresight-etm4x-core.c | 21 +++++++++--------
.../hwtracing/coresight/coresight-tmc-core.c | 23 ++++++++++---------
3 files changed, 34 insertions(+), 31 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-catu.c b/drivers/hwtracing/coresight/coresight-catu.c
index ad8dafea7d2f..d9a12d5e48fa 100644
--- a/drivers/hwtracing/coresight/coresight-catu.c
+++ b/drivers/hwtracing/coresight/coresight-catu.c
@@ -612,16 +612,6 @@ static const struct amba_id catu_ids[] = {
MODULE_DEVICE_TABLE(amba, catu_ids);
-static struct amba_driver catu_driver = {
- .drv = {
- .name = "coresight-catu",
- .suppress_bind_attrs = true,
- },
- .probe = catu_probe,
- .remove = catu_remove,
- .id_table = catu_ids,
-};
-
static int catu_platform_probe(struct platform_device *pdev)
{
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -702,6 +692,17 @@ static struct platform_driver catu_platform_driver = {
},
};
+static struct amba_driver catu_driver = {
+ .drv = {
+ .name = "coresight-catu",
+ .pm = &catu_dev_pm_ops,
+ .suppress_bind_attrs = true,
+ },
+ .probe = catu_probe,
+ .remove = catu_remove,
+ .id_table = catu_ids,
+};
+
static int __init catu_init(void)
{
int ret;
diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c
index 2247ad55d444..ace5e077a10c 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x-core.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c
@@ -2460,16 +2460,6 @@ static const struct amba_id etm4_ids[] = {
MODULE_DEVICE_TABLE(amba, etm4_ids);
-static struct amba_driver etm4x_amba_driver = {
- .drv = {
- .name = "coresight-etm4x",
- .suppress_bind_attrs = true,
- },
- .probe = etm4_probe_amba,
- .remove = etm4_remove_amba,
- .id_table = etm4_ids,
-};
-
#ifdef CONFIG_PM
static int etm4_runtime_suspend(struct device *dev)
{
@@ -2528,6 +2518,17 @@ static struct platform_driver etm4_platform_driver = {
},
};
+static struct amba_driver etm4x_amba_driver = {
+ .drv = {
+ .name = "coresight-etm4x",
+ .pm = &etm4_dev_pm_ops,
+ .suppress_bind_attrs = true,
+ },
+ .probe = etm4_probe_amba,
+ .remove = etm4_remove_amba,
+ .id_table = etm4_ids,
+};
+
static int __init etm4x_init(void)
{
int ret;
diff --git a/drivers/hwtracing/coresight/coresight-tmc-core.c b/drivers/hwtracing/coresight/coresight-tmc-core.c
index bc5a133ada3e..ece2e8c9be26 100644
--- a/drivers/hwtracing/coresight/coresight-tmc-core.c
+++ b/drivers/hwtracing/coresight/coresight-tmc-core.c
@@ -953,17 +953,6 @@ static const struct amba_id tmc_ids[] = {
MODULE_DEVICE_TABLE(amba, tmc_ids);
-static struct amba_driver tmc_driver = {
- .drv = {
- .name = "coresight-tmc",
- .suppress_bind_attrs = true,
- },
- .probe = tmc_probe,
- .shutdown = tmc_shutdown,
- .remove = tmc_remove,
- .id_table = tmc_ids,
-};
-
static int tmc_platform_probe(struct platform_device *pdev)
{
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -1044,6 +1033,18 @@ static struct platform_driver tmc_platform_driver = {
},
};
+static struct amba_driver tmc_driver = {
+ .drv = {
+ .name = "coresight-tmc",
+ .pm = &tmc_dev_pm_ops,
+ .suppress_bind_attrs = true,
+ },
+ .probe = tmc_probe,
+ .shutdown = tmc_shutdown,
+ .remove = tmc_remove,
+ .id_table = tmc_ids,
+};
+
static int __init tmc_init(void)
{
return coresight_init_driver("tmc", &tmc_driver, &tmc_platform_driver);
--
2.55.0.1003.g10538fe699-goog
next prev parent reply other threads:[~2026-09-10 14:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 14:51 [PATCH 0/2] coresight: Fix missing AMBA dev_pm_ops and modernize PM ops Eric Chan
2026-09-10 14:51 ` Eric Chan [this message]
2026-09-10 14:51 ` [PATCH 2/2] coresight: Switch to DEFINE_RUNTIME_DEV_PM_OPS() Eric Chan
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=20260910145107.3640991-2-ericchancf@google.com \
--to=ericchancf@google.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=anshuman.khandual@arm.com \
--cc=coresight@lists.linaro.org \
--cc=james.clark@linaro.org \
--cc=leo.yan@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.leach@linaro.org \
--cc=stable@vger.kernel.org \
--cc=sudeep.holla@kernel.org \
--cc=suzuki.poulose@arm.com \
/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
all inboxes | Powered by JetHome®