Skip to content

Commit dc872c5

Browse files
Jie GanSuzuki K Poulose
authored andcommitted
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 <[email protected]> Signed-off-by: Jie Gan <[email protected]> Signed-off-by: Suzuki K Poulose <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 1e4e454 commit dc872c5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

include/linux/coresight.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,11 @@ static inline struct clk *coresight_get_enable_apb_pclk(struct device *dev)
471471
int ret;
472472

473473
pclk = clk_get(dev, "apb_pclk");
474-
if (IS_ERR(pclk))
475-
return NULL;
474+
if (IS_ERR(pclk)) {
475+
pclk = clk_get(dev, "apb");
476+
if (IS_ERR(pclk))
477+
return NULL;
478+
}
476479

477480
ret = clk_prepare_enable(pclk);
478481
if (ret) {

0 commit comments

Comments
 (0)