Lines Matching refs:rate
185 static long cdce706_pll_round_rate(struct clk_hw *hw, unsigned long rate,
193 "%s, rate: %lu, parent_rate: %lu\n",
194 __func__, rate, *parent_rate);
196 rational_best_approximation(rate, *parent_rate,
211 static int cdce706_pll_set_rate(struct clk_hw *hw, unsigned long rate,
246 rate > CDCE706_PLL_FREQ_HI ?
290 static long cdce706_divider_round_rate(struct clk_hw *hw, unsigned long rate,
298 "%s, rate: %lu, parent_rate: %lu\n",
299 __func__, rate, *parent_rate);
301 rational_best_approximation(rate, *parent_rate,
308 unsigned long best_diff = rate;
313 for (div = CDCE706_PLL_FREQ_MIN / rate; best_diff &&
314 div <= CDCE706_PLL_FREQ_MAX / rate; ++div) {
320 if (rate * div < CDCE706_PLL_FREQ_MIN)
323 rational_best_approximation(rate * div, gp_rate,
331 diff = max(div_rate, rate) - min(div_rate, rate);
345 "%s, altering parent rate: %lu -> %lu\n",
346 __func__, *parent_rate, rate * div);
347 *parent_rate = rate * div;
358 static int cdce706_divider_set_rate(struct clk_hw *hw, unsigned long rate,
423 static long cdce706_clkout_round_rate(struct clk_hw *hw, unsigned long rate,
426 *parent_rate = rate;
427 return rate;
430 static int cdce706_clkout_set_rate(struct clk_hw *hw, unsigned long rate,