Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88ea0a44 authored by Mike Tipton's avatar Mike Tipton Committed by Gerrit - the friendly Code Review server
Browse files

clk: qcom: Round parent rate in clk_rcg2_determine_rate



We currently set best_parent_rate to the ideal frequency wanted by the
RCG. This doesn't always align to the exact frequency the parent can
provide. If they differ, then clk_calc_new_rates() will return the
parent as top, even if the rounded parent frequency isn't changing.
This causes clk_propagate_rate_change() to return before being called
for its children, which means children aren't notified of the
PRE_RATE_CHANGE events.

Set best_parent_rate to the rounded rate so that we don't unnecessarily
try to change the parent.

Change-Id: Ic976db7a13dfbc63cb66b032a45060565ca90b43
Signed-off-by: default avatarMike Tipton <mdtipton@codeaurora.org>
parent 4a24cc84
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -359,7 +359,7 @@ static int _freq_tbl_determine_rate(struct clk_hw *hw, const struct freq_tbl *f,
		rate =  clk_hw_get_rate(p);
	}
	req->best_parent_hw = p;
	req->best_parent_rate = rate;
	req->best_parent_rate = clk_hw_round_rate(p, rate);
	req->rate = f->freq;

	if (f->src_freq != FIXED_FREQ_SRC) {