Lines Matching refs:rate
307 static long vc5_dbl_round_rate(struct clk_hw *hw, unsigned long rate,
310 if ((*parent_rate == rate) || ((*parent_rate * 2) == rate))
311 return rate;
316 static int vc5_dbl_set_rate(struct clk_hw *hw, unsigned long rate,
323 if ((parent_rate * 2) == rate)
366 static long vc5_pfd_round_rate(struct clk_hw *hw, unsigned long rate,
372 if (rate > 50000000)
379 idiv = DIV_ROUND_UP(*parent_rate, rate);
386 static int vc5_pfd_set_rate(struct clk_hw *hw, unsigned long rate,
405 idiv = DIV_ROUND_UP(parent_rate, rate);
447 static long vc5_pll_round_rate(struct clk_hw *hw, unsigned long rate,
455 rate = clamp(rate, VC5_PLL_VCO_MIN, vc5->chip_info->vco_max);
458 div_int = rate / *parent_rate;
460 rate = *parent_rate * 0xfff;
463 div_frc = rate % *parent_rate;
473 static int vc5_pll_set_rate(struct clk_hw *hw, unsigned long rate,
523 static long vc5_fod_round_rate(struct clk_hw *hw, unsigned long rate,
533 div_int = f_in / rate;
541 rate = f_in / div_int;
545 div_frc = f_in % rate;
547 do_div(div_frc, rate);
555 static int vc5_fod_set_rate(struct clk_hw *hw, unsigned long rate,