[PATCH 1/2] coresight: Add missing dev_pm_ops to AMBA drivers
From: Eric Chan
Date: Thu Sep 10 2026 - 11:04:31 EST
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@xxxxxxxxxxxxxxx
Signed-off-by: Eric Chan <ericchancf@xxxxxxxxxx>
---
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