Lines Matching refs:rate

394 			   unsigned long rate, unsigned long parent_rate)  in _get_table_rate()  argument
401 sel->output_rate == rate) in _get_table_rate()
418 unsigned long rate, unsigned long parent_rate) in _calc_rate() argument
428 cfreq = (rate <= 1000000 * 1000) ? 1000000 : 2000000; in _calc_rate()
431 cfreq = (rate <= 1000000 * 1000) ? 1000000 : 2600000; in _calc_rate()
435 cfreq = (rate <= 1200000 * 1000) ? 1200000 : 2400000; in _calc_rate()
451 for (cfg->output_rate = rate; cfg->output_rate < 200 * cfreq; in _calc_rate()
541 unsigned long rate) in _update_pll_cpcon() argument
556 if (rate >= (pll->params->vco_max >> 1)) in _update_pll_cpcon()
564 unsigned long rate) in _program_pll() argument
577 _update_pll_cpcon(pll, cfg, rate); in _program_pll()
587 static int clk_pll_set_rate(struct clk_hw *hw, unsigned long rate, in clk_pll_set_rate() argument
596 if (rate != pll->params->fixed_rate) { in clk_pll_set_rate()
599 pll->params->fixed_rate, rate); in clk_pll_set_rate()
605 if (_get_table_rate(hw, &cfg, rate, parent_rate) && in clk_pll_set_rate()
606 _calc_rate(hw, &cfg, rate, parent_rate)) { in clk_pll_set_rate()
608 clk_hw_get_name(hw), rate); in clk_pll_set_rate()
618 ret = _program_pll(hw, &cfg, rate); in clk_pll_set_rate()
626 static long clk_pll_round_rate(struct clk_hw *hw, unsigned long rate, in clk_pll_round_rate() argument
639 if (_get_table_rate(hw, &cfg, rate, *prate) && in clk_pll_round_rate()
640 _calc_rate(hw, &cfg, rate, *prate)) in clk_pll_round_rate()
652 u64 rate = parent_rate; in clk_pll_recalc_rate() local
682 rate *= cfg.n; in clk_pll_recalc_rate()
683 do_div(rate, cfg.m); in clk_pll_recalc_rate()
685 return rate; in clk_pll_recalc_rate()
791 u64 rate = parent_rate; in clk_plle_recalc_rate() local
798 rate *= divn; in clk_plle_recalc_rate()
799 do_div(rate, divm); in clk_plle_recalc_rate()
800 return rate; in clk_plle_recalc_rate()
922 unsigned long rate, unsigned long parent_rate) in _calc_dynamic_ramp_rate() argument
928 if (!rate) in _calc_dynamic_ramp_rate()
931 p = DIV_ROUND_UP(pll->params->vco_min, rate); in _calc_dynamic_ramp_rate()
933 cfg->output_rate = rate * p; in _calc_dynamic_ramp_rate()
950 unsigned long rate, unsigned long parent_rate) in _pll_ramp_calc_pll() argument
955 err = _get_table_rate(hw, cfg, rate, parent_rate); in _pll_ramp_calc_pll()
957 err = _calc_dynamic_ramp_rate(hw, cfg, rate, parent_rate); in _pll_ramp_calc_pll()
978 static int clk_pllxc_set_rate(struct clk_hw *hw, unsigned long rate, in clk_pllxc_set_rate() argument
986 ret = _pll_ramp_calc_pll(hw, &cfg, rate, parent_rate); in clk_pllxc_set_rate()
996 ret = _program_pll(hw, &cfg, rate); in clk_pllxc_set_rate()
1004 static long clk_pll_ramp_round_rate(struct clk_hw *hw, unsigned long rate, in clk_pll_ramp_round_rate() argument
1011 ret = _pll_ramp_calc_pll(hw, &cfg, rate, *prate); in clk_pll_ramp_round_rate()
1025 static int clk_pllm_set_rate(struct clk_hw *hw, unsigned long rate, in clk_pllm_set_rate() argument
1038 if (rate != clk_get_rate(hw->clk)) { in clk_pllm_set_rate()
1046 ret = _pll_ramp_calc_pll(hw, &cfg, rate, parent_rate); in clk_pllm_set_rate()
1161 static int clk_pllc_set_rate(struct clk_hw *hw, unsigned long rate, in clk_pllc_set_rate() argument
1172 ret = _pll_ramp_calc_pll(hw, &cfg, rate, parent_rate); in clk_pllc_set_rate()
1208 unsigned long rate, unsigned long parent_rate) in _pllre_calc_rate() argument
1214 n = rate * m / parent_rate; in _pllre_calc_rate()
1227 static int clk_pllre_set_rate(struct clk_hw *hw, unsigned long rate, in clk_pllre_set_rate() argument
1238 _pllre_calc_rate(pll, &cfg, rate, parent_rate); in clk_pllre_set_rate()
1266 u64 rate = parent_rate; in clk_pllre_recalc_rate() local
1270 rate *= cfg.n; in clk_pllre_recalc_rate()
1271 do_div(rate, cfg.m); in clk_pllre_recalc_rate()
1273 return rate; in clk_pllre_recalc_rate()
1276 static long clk_pllre_round_rate(struct clk_hw *hw, unsigned long rate, in clk_pllre_round_rate() argument
1281 return _pllre_calc_rate(pll, NULL, rate, *prate); in clk_pllre_round_rate()