return 0;
}
-static long clk_aspeed_peci_round_rate(struct clk_hw *hw, unsigned long rate,
- unsigned long *prate)
+static int clk_aspeed_peci_determine_rate(struct clk_hw *hw,
+ struct clk_rate_request *req)
{
- int div = clk_aspeed_peci_get_div(rate, prate);
+ int div = clk_aspeed_peci_get_div(req->rate, &req->best_parent_rate);
- return DIV_ROUND_UP_ULL(*prate, div);
+ req->rate = DIV_ROUND_UP_ULL(req->best_parent_rate, div);
+
+ return 0;
}
static unsigned long clk_aspeed_peci_recalc_rate(struct clk_hw *hw, unsigned long prate)
static const struct clk_ops clk_aspeed_peci_ops = {
.set_rate = clk_aspeed_peci_set_rate,
- .round_rate = clk_aspeed_peci_round_rate,
+ .determine_rate = clk_aspeed_peci_determine_rate,
.recalc_rate = clk_aspeed_peci_recalc_rate,
};