Lines Matching refs:rate
186 static long cdce706_pll_round_rate(struct clk_hw *hw, unsigned long rate,
194 "%s, rate: %lu, parent_rate: %lu\n",
195 __func__, rate, *parent_rate);
197 rational_best_approximation(rate, *parent_rate,
212 static int cdce706_pll_set_rate(struct clk_hw *hw, unsigned long rate,
247 rate > CDCE706_PLL_FREQ_HI ?
296 unsigned long rate = req->rate;
300 "%s, rate: %lu, parent_rate: %lu\n",
301 __func__, rate, req->best_parent_rate);
303 rational_best_approximation(rate, req->best_parent_rate,
310 unsigned long best_diff = rate;
315 for (div = CDCE706_PLL_FREQ_MIN / rate; best_diff &&
316 div <= CDCE706_PLL_FREQ_MAX / rate; ++div) {
322 if (rate * div < CDCE706_PLL_FREQ_MIN)
325 rational_best_approximation(rate * div, gp_rate,
333 diff = max(div_rate, rate) - min(div_rate, rate);
347 "%s, altering parent rate: %lu -> %lu\n",
348 __func__, req->best_parent_rate, rate * div);
349 req->best_parent_rate = rate * div;
357 req->rate = req->best_parent_rate / div;
361 static int cdce706_divider_set_rate(struct clk_hw *hw, unsigned long rate,
429 req->best_parent_rate = req->rate;
434 static int cdce706_clkout_set_rate(struct clk_hw *hw, unsigned long rate,