diff options
author | Martin Blumenstingl <martin.blumenstingl@googlemail.com> | 2021-07-03 00:51:45 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2021-08-05 17:36:10 -0700 |
commit | 23a57ee7af01a51cf5e8568f3410dd493ecb8d3d (patch) | |
tree | 7306f87c3762da558bc83f9694b702f7ecbbd40c /drivers/clk | |
parent | f9d6b4832ca8a7e00718ad6cabe7371649be4ae9 (diff) | |
download | linux-23a57ee7af01a51cf5e8568f3410dd493ecb8d3d.tar.gz linux-23a57ee7af01a51cf5e8568f3410dd493ecb8d3d.tar.bz2 linux-23a57ee7af01a51cf5e8568f3410dd493ecb8d3d.zip |
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>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/clk-stm32mp1.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/clk/clk-stm32mp1.c b/drivers/clk/clk-stm32mp1.c index 256575bd29b9..4bd1fe7d8af4 100644 --- a/drivers/clk/clk-stm32mp1.c +++ b/drivers/clk/clk-stm32mp1.c @@ -1076,14 +1076,10 @@ static int clk_divider_rtc_set_rate(struct clk_hw *hw, unsigned long rate, static int clk_divider_rtc_determine_rate(struct clk_hw *hw, struct clk_rate_request *req) { - unsigned long best_parent_rate = req->best_parent_rate; + if (req->best_parent_hw == clk_hw_get_parent_by_index(hw, HSE_RTC)) + return clk_divider_ops.determine_rate(hw, req); - if (req->best_parent_hw == clk_hw_get_parent_by_index(hw, HSE_RTC)) { - req->rate = clk_divider_ops.round_rate(hw, req->rate, &best_parent_rate); - req->best_parent_rate = best_parent_rate; - } else { - req->rate = best_parent_rate; - } + req->rate = req->best_parent_rate; return 0; } |