[SRU][N][PATCH v2 3/6] UBUNTU: SAUCE: Revert "coresight: tmc: Support atclk"

Noah Wager noah.wager at canonical.com
Wed Feb 25 16:53:59 UTC 2026


BugLink: https://bugs.launchpad.net/bugs/2142337

This reverts commit b29444d683eb416e547f57d1fb7094388518232b.

The dependent commit
aaf260b9572e ("coresight: tmc: Move ACPI support from AMBA driver to platform driver")
breaks coresight builds because it depends on patches that were not
ported. We need to revert that commit, so this also needs to be
reverted.

This revert is acceptable because the generic kernel has not
demonstrated any need for this atclk fix.

Signed-off-by: Noah Wager <noah.wager at canonical.com>
---
 .../hwtracing/coresight/coresight-tmc-core.c  | 22 +++++--------------
 drivers/hwtracing/coresight/coresight-tmc.h   |  2 --
 2 files changed, 5 insertions(+), 19 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight-tmc-core.c b/drivers/hwtracing/coresight/coresight-tmc-core.c
index 9fe37c9b4901..fae5e842f65c 100644
--- a/drivers/hwtracing/coresight/coresight-tmc-core.c
+++ b/drivers/hwtracing/coresight/coresight-tmc-core.c
@@ -449,10 +449,6 @@ static int __tmc_probe(struct device *dev, struct resource *res)
 	struct coresight_desc desc = { 0 };
 	struct coresight_dev_list *dev_list = NULL;
 
-	drvdata->atclk = devm_clk_get_optional_enabled(dev, "atclk");
-	if (IS_ERR(drvdata->atclk))
-		return PTR_ERR(drvdata->atclk);
-
 	ret = -ENOMEM;
 
 	/* Validity for the resource is already checked by the AMBA core */
@@ -676,26 +672,18 @@ static int tmc_runtime_suspend(struct device *dev)
 {
 	struct tmc_drvdata *drvdata = dev_get_drvdata(dev);
 
-	clk_disable_unprepare(drvdata->atclk);
-	clk_disable_unprepare(drvdata->pclk);
-
+	if (drvdata && !IS_ERR_OR_NULL(drvdata->pclk))
+		clk_disable_unprepare(drvdata->pclk);
 	return 0;
 }
 
 static int tmc_runtime_resume(struct device *dev)
 {
 	struct tmc_drvdata *drvdata = dev_get_drvdata(dev);
-	int ret;
-
-	ret = clk_prepare_enable(drvdata->pclk);
-	if (ret)
-		return ret;
-
-	ret = clk_prepare_enable(drvdata->atclk);
-	if (ret)
-		clk_disable_unprepare(drvdata->pclk);
 
-	return ret;
+	if (drvdata && !IS_ERR_OR_NULL(drvdata->pclk))
+		clk_prepare_enable(drvdata->pclk);
+	return 0;
 }
 #endif
 
diff --git a/drivers/hwtracing/coresight/coresight-tmc.h b/drivers/hwtracing/coresight/coresight-tmc.h
index 1d6f9369a374..cb5a0920c203 100644
--- a/drivers/hwtracing/coresight/coresight-tmc.h
+++ b/drivers/hwtracing/coresight/coresight-tmc.h
@@ -166,7 +166,6 @@ struct etr_buf {
 
 /**
  * struct tmc_drvdata - specifics associated to an TMC component
- * @atclk:	optional clock for the core parts of the TMC.
  * @pclk:	APB clock if present, otherwise NULL
  * @base:	memory mapped base address for this component.
  * @csdev:	component vitals needed by the framework.
@@ -192,7 +191,6 @@ struct etr_buf {
  * @perf_buf:	PERF buffer for ETR.
  */
 struct tmc_drvdata {
-	struct clk		*atclk;
 	struct clk		*pclk;
 	void __iomem		*base;
 	struct coresight_device	*csdev;
-- 
2.43.0




More information about the kernel-team mailing list