Skip to content

Commit 9ac3239

Browse files
xdarklightjbrun3t
authored andcommitted
clk: meson: sclk-div: switch from .round_rate to .determine_rate
clk_ops.round_rate will be removed at some point. It's replacement is .determine_rate. Switch sclk-div over to use .determine_rate. Signed-off-by: Martin Blumenstingl <[email protected]> Acked-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jerome Brunet <[email protected]>
1 parent 581f772 commit 9ac3239

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

drivers/clk/meson/sclk-div.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,17 @@ static int sclk_div_bestdiv(struct clk_hw *hw, unsigned long rate,
9696
return bestdiv;
9797
}
9898

99-
static long sclk_div_round_rate(struct clk_hw *hw, unsigned long rate,
100-
unsigned long *prate)
99+
static int sclk_div_determine_rate(struct clk_hw *hw,
100+
struct clk_rate_request *req)
101101
{
102102
struct clk_regmap *clk = to_clk_regmap(hw);
103103
struct meson_sclk_div_data *sclk = meson_sclk_div_data(clk);
104104
int div;
105105

106-
div = sclk_div_bestdiv(hw, rate, prate, sclk);
106+
div = sclk_div_bestdiv(hw, req->rate, &req->best_parent_rate, sclk);
107+
req->rate = DIV_ROUND_UP_ULL((u64)req->best_parent_rate, div);
107108

108-
return DIV_ROUND_UP_ULL((u64)*prate, div);
109+
return 0;
109110
}
110111

111112
static void sclk_apply_ratio(struct clk_regmap *clk,
@@ -237,7 +238,7 @@ static int sclk_div_init(struct clk_hw *hw)
237238

238239
const struct clk_ops meson_sclk_div_ops = {
239240
.recalc_rate = sclk_div_recalc_rate,
240-
.round_rate = sclk_div_round_rate,
241+
.determine_rate = sclk_div_determine_rate,
241242
.set_rate = sclk_div_set_rate,
242243
.enable = sclk_div_enable,
243244
.disable = sclk_div_disable,

0 commit comments

Comments
 (0)