]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Coresight: Add support for new APB clock name
authorJie Gan <quic_jiegan@quicinc.com>
Mon, 3 Mar 2025 03:29:22 +0000 (11:29 +0800)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Tue, 4 Mar 2025 14:48:43 +0000 (14:48 +0000)
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
include/linux/coresight.h

index c7614ccb32325ea1ae0a6ac794597fe5b6cb53d1..2e493d5288d8b550dcadfe3668c994e1392624c1 100644 (file)
@@ -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) {