]> Git Repo - linux.git/commitdiff
clk: stm32mp1: Switch to clk_divider.determine_rate
authorMartin Blumenstingl <[email protected]>
Fri, 2 Jul 2021 22:51:45 +0000 (00:51 +0200)
committerStephen Boyd <[email protected]>
Fri, 6 Aug 2021 00:36:10 +0000 (17:36 -0700)
.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]>
drivers/clk/clk-stm32mp1.c

index 256575bd29b942bffb047943509f6e537d1d8524..4bd1fe7d8af4a4ee06b7548d6dd18320c7ed83e3 100644 (file)
@@ -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;
 }
This page took 0.059463 seconds and 4 git commands to generate.