Skip to content

Commit 25f1c96

Browse files
Chuan Liubebarino
authored andcommitted
clk: Fix invalid execution of clk_set_rate
Some clocks have rates that can be changed elsewhere, so add a flag CLK_GET_RATE_NOCACHE(such as scmi_clk) to these clocks to ensure that the real-time rate is obtained. When clk_set_rate is called, it is returned if the request to set rate is consistent with the current rate. Getting the current rate in clk_set_rate returns the rate stored in clk_core. CLK_GET_RATE_NOCACHE does not take effect here. Signed-off-by: Chuan Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 6e4bf01 commit 25f1c96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clk/clk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2530,7 +2530,7 @@ static int clk_core_set_rate_nolock(struct clk_core *core,
25302530
rate = clk_core_req_round_rate_nolock(core, req_rate);
25312531

25322532
/* bail early if nothing to do */
2533-
if (rate == clk_core_get_rate_nolock(core))
2533+
if (rate == clk_core_get_rate_recalc(core))
25342534
return 0;
25352535

25362536
/* fail on a direct rate set of a protected provider */

0 commit comments

Comments
 (0)