Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: linux-stm32@st-md-mailman.stormreply.com
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20210702225145.2643303-7-martin.blumenstingl@googlemail.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Martin Blumenstingl and committed by
Stephen Boyd
23a57ee7 f9d6b483

+3 -7
+3 -7
drivers/clk/clk-stm32mp1.c
··· 1076 1076 1077 1077 static int clk_divider_rtc_determine_rate(struct clk_hw *hw, struct clk_rate_request *req) 1078 1078 { 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); 1080 1081 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; 1087 1083 1088 1084 return 0; 1089 1085 }