mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
clk: meson: mpll: Switch from .round_rate to .determine_rate
clk_ops.round_rate will be removed at some point. It's replacement is .determine_rate. Switch clk-mpll over to use .determine_rate. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Acked-by: Stephen Boyd <sboyd@kernel.org> Link: https://lore.kernel.org/r/20221225212632.2760126-2-martin.blumenstingl@googlemail.com Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
This commit is contained in:
parent
1b929c02af
commit
1fd62f262e
@ -87,16 +87,22 @@ static unsigned long mpll_recalc_rate(struct clk_hw *hw,
|
||||
return rate < 0 ? 0 : rate;
|
||||
}
|
||||
|
||||
static long mpll_round_rate(struct clk_hw *hw,
|
||||
unsigned long rate,
|
||||
unsigned long *parent_rate)
|
||||
static int mpll_determine_rate(struct clk_hw *hw, struct clk_rate_request *req)
|
||||
{
|
||||
struct clk_regmap *clk = to_clk_regmap(hw);
|
||||
struct meson_clk_mpll_data *mpll = meson_clk_mpll_data(clk);
|
||||
unsigned int sdm, n2;
|
||||
long rate;
|
||||
|
||||
params_from_rate(rate, *parent_rate, &sdm, &n2, mpll->flags);
|
||||
return rate_from_params(*parent_rate, sdm, n2);
|
||||
params_from_rate(req->rate, req->best_parent_rate, &sdm, &n2,
|
||||
mpll->flags);
|
||||
|
||||
rate = rate_from_params(req->best_parent_rate, sdm, n2);
|
||||
if (rate < 0)
|
||||
return rate;
|
||||
|
||||
req->rate = rate;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mpll_set_rate(struct clk_hw *hw,
|
||||
@ -157,13 +163,13 @@ static int mpll_init(struct clk_hw *hw)
|
||||
|
||||
const struct clk_ops meson_clk_mpll_ro_ops = {
|
||||
.recalc_rate = mpll_recalc_rate,
|
||||
.round_rate = mpll_round_rate,
|
||||
.determine_rate = mpll_determine_rate,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(meson_clk_mpll_ro_ops);
|
||||
|
||||
const struct clk_ops meson_clk_mpll_ops = {
|
||||
.recalc_rate = mpll_recalc_rate,
|
||||
.round_rate = mpll_round_rate,
|
||||
.determine_rate = mpll_determine_rate,
|
||||
.set_rate = mpll_set_rate,
|
||||
.init = mpll_init,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user