summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJie Gan <quic_jiegan@quicinc.com>2025-03-03 11:29:22 +0800
committerSuzuki K Poulose <suzuki.poulose@arm.com>2025-03-04 14:48:43 +0000
commitdc872c5f527a07124b2ad92d8c70d11829f17ac9 (patch)
tree4675e3ec291071c1846a2d218158f5d20342a84a
parent1e4e454223f770748775f211455513c79cb3121e (diff)
Coresight: Add support for new APB clock name
Add support for new APB clock-name. If the function fails to obtain the clock with the name "apb_pclk", it will attempt to acquire the clock with the name "apb". Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Jie Gan <quic_jiegan@quicinc.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20250303032931.2500935-2-quic_jiegan@quicinc.com
-rw-r--r--include/linux/coresight.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/coresight.h b/include/linux/coresight.h
index c7614ccb3232..2e493d5288d8 100644
--- a/include/linux/coresight.h
+++ b/include/linux/coresight.h
@@ -471,8 +471,11 @@ static inline struct clk *coresight_get_enable_apb_pclk(struct device *dev)
int ret;
pclk = clk_get(dev, "apb_pclk");
- if (IS_ERR(pclk))
- return NULL;
+ if (IS_ERR(pclk)) {
+ pclk = clk_get(dev, "apb");
+ if (IS_ERR(pclk))
+ return NULL;
+ }
ret = clk_prepare_enable(pclk);
if (ret) {