Lines Matching full:rate
66 unsigned long rate, parent_rate; member
101 * so get the parent rate explicitly. in emc_recalc_rate()
112 * Rounds up unless no higher rate exists, in which case down. This way is
113 * safer since things have EMC rate floors. Also don't touch parent_rate
138 if (timing->rate < req->rate && i != t - 1) in emc_determine_rate()
141 if (timing->rate > req->max_rate) { in emc_determine_rate()
143 req->rate = tegra->timings[i - 1].rate; in emc_determine_rate()
147 if (timing->rate < req->min_rate) in emc_determine_rate()
150 req->rate = timing->rate; in emc_determine_rate()
155 req->rate = timing->rate; in emc_determine_rate()
159 req->rate = clk_hw_get_rate(hw); in emc_determine_rate()
221 pr_debug("going to rate %ld prate %ld p %s\n", timing->rate, in emc_set_timing()
226 WARN_ONCE(1, "parent %s rate mismatch %lu %lu\n", in emc_set_timing()
237 pr_err("cannot change parent %s rate to %ld: %d\n", in emc_set_timing()
250 div = timing->parent_rate / (timing->rate / 2) - 2; in emc_set_timing()
252 err = tegra->prepare_timing_change(emc, timing->rate); in emc_set_timing()
272 tegra->complete_timing_change(emc, timing->rate); in emc_set_timing()
286 * find a timing with a higher clock rate to avoid a rate below any set rate
287 * floors. If that is not possible, find a lower rate.
321 static int emc_set_rate(struct clk_hw *hw, unsigned long rate, in emc_set_rate() argument
331 if (clk_hw_get_rate(hw) == rate) in emc_set_rate()
335 * When emc_set_timing changes the parent rate, CCF will propagate in emc_set_rate()
336 * that downward to us, so ignore any set_rate calls while a rate in emc_set_rate()
343 if (tegra->timings[i].rate == rate && in emc_set_rate()
351 pr_err("cannot switch to rate %ld without emc table\n", rate); in emc_set_rate()
359 * Parent clock source not changed but parent rate has changed, in emc_set_rate()
371 pr_debug("using %ld as backup rate when going to %ld\n", in emc_set_rate()
372 backup_timing->rate, rate); in emc_set_rate()
395 pr_err("timing %pOF: failed to read rate\n", node); in load_one_timing_from_dt()
399 timing->rate = tmp; in load_one_timing_from_dt()
403 pr_err("timing %pOF: failed to read parent rate\n", node); in load_one_timing_from_dt()
434 if (a->rate < b->rate) in cmp_timings()
436 else if (a->rate == b->rate) in cmp_timings()