Skip to content

Commit 23a57ee

Browse files
xdarklightbebarino
authored andcommitted
clk: stm32mp1: Switch to clk_divider.determine_rate
.determine_rate is meant to replace .round_rate in CCF in the future. Switch over to .determine_rate now that clk_divider_ops has gained support for that. Cc: Maxime Coquelin <[email protected]> Cc: Alexandre Torgue <[email protected]> Cc: [email protected] Signed-off-by: Martin Blumenstingl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent f9d6b48 commit 23a57ee

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

drivers/clk/clk-stm32mp1.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,14 +1076,10 @@ static int clk_divider_rtc_set_rate(struct clk_hw *hw, unsigned long rate,
10761076

10771077
static int clk_divider_rtc_determine_rate(struct clk_hw *hw, struct clk_rate_request *req)
10781078
{
1079-
unsigned long best_parent_rate = req->best_parent_rate;
1079+
if (req->best_parent_hw == clk_hw_get_parent_by_index(hw, HSE_RTC))
1080+
return clk_divider_ops.determine_rate(hw, req);
10801081

1081-
if (req->best_parent_hw == clk_hw_get_parent_by_index(hw, HSE_RTC)) {
1082-
req->rate = clk_divider_ops.round_rate(hw, req->rate, &best_parent_rate);
1083-
req->best_parent_rate = best_parent_rate;
1084-
} else {
1085-
req->rate = best_parent_rate;
1086-
}
1082+
req->rate = req->best_parent_rate;
10871083

10881084
return 0;
10891085
}

0 commit comments

Comments
 (0)