Lines Matching refs:rate
54 return clk->parent->rate / div; in omap1_sossi_recalc()
132 static int calc_dsor_exp(struct clk *clk, unsigned long rate) in calc_dsor_exp() argument
153 realrate = parent->rate; in calc_dsor_exp()
155 if (realrate <= rate) in calc_dsor_exp()
169 return clk->parent->rate / dsor; in omap1_ckctl_recalc()
187 return clk->parent->rate / dsor; in omap1_ckctl_recalc_dsp_domain()
191 int omap1_select_table_rate(struct clk *clk, unsigned long rate) in omap1_select_table_rate() argument
197 ref_rate = ck_ref_p->rate; in omap1_select_table_rate()
199 for (ptr = omap1_rate_table; ptr->rate; ptr++) { in omap1_select_table_rate()
207 if (ptr->rate <= rate) in omap1_select_table_rate()
211 if (!ptr->rate) in omap1_select_table_rate()
221 ck_dpll1_p->rate = ptr->pll_rate; in omap1_select_table_rate()
226 int omap1_clk_set_rate_dsp_domain(struct clk *clk, unsigned long rate) in omap1_clk_set_rate_dsp_domain() argument
231 dsor_exp = calc_dsor_exp(clk, rate); in omap1_clk_set_rate_dsp_domain()
241 clk->rate = clk->parent->rate / (1 << dsor_exp); in omap1_clk_set_rate_dsp_domain()
246 long omap1_clk_round_rate_ckctl_arm(struct clk *clk, unsigned long rate) in omap1_clk_round_rate_ckctl_arm() argument
248 int dsor_exp = calc_dsor_exp(clk, rate); in omap1_clk_round_rate_ckctl_arm()
253 return clk->parent->rate / (1 << dsor_exp); in omap1_clk_round_rate_ckctl_arm()
256 int omap1_clk_set_rate_ckctl_arm(struct clk *clk, unsigned long rate) in omap1_clk_set_rate_ckctl_arm() argument
261 dsor_exp = calc_dsor_exp(clk, rate); in omap1_clk_set_rate_ckctl_arm()
272 clk->rate = clk->parent->rate / (1 << dsor_exp); in omap1_clk_set_rate_ckctl_arm()
276 long omap1_round_to_table_rate(struct clk *clk, unsigned long rate) in omap1_round_to_table_rate() argument
283 ref_rate = ck_ref_p->rate; in omap1_round_to_table_rate()
287 for (ptr = omap1_rate_table; ptr->rate; ptr++) { in omap1_round_to_table_rate()
294 highest_rate = ptr->rate; in omap1_round_to_table_rate()
297 if (ptr->rate <= rate) in omap1_round_to_table_rate()
304 static unsigned calc_ext_dsor(unsigned long rate) in calc_ext_dsor() argument
320 if (rate >= 96000000 / dsor) in calc_ext_dsor()
327 int omap1_set_uart_rate(struct clk *clk, unsigned long rate) in omap1_set_uart_rate() argument
332 if (rate == 12000000) in omap1_set_uart_rate()
334 else if (rate == 48000000) in omap1_set_uart_rate()
339 clk->rate = rate; in omap1_set_uart_rate()
345 int omap1_set_ext_clk_rate(struct clk *clk, unsigned long rate) in omap1_set_ext_clk_rate() argument
350 dsor = calc_ext_dsor(rate); in omap1_set_ext_clk_rate()
351 clk->rate = 96000000 / dsor; in omap1_set_ext_clk_rate()
363 int omap1_set_sossi_rate(struct clk *clk, unsigned long rate) in omap1_set_sossi_rate() argument
369 p_rate = clk->parent->rate; in omap1_set_sossi_rate()
371 div = (p_rate + rate - 1) / rate; in omap1_set_sossi_rate()
381 clk->rate = p_rate / (div + 1); in omap1_set_sossi_rate()
386 long omap1_round_ext_clk_rate(struct clk *clk, unsigned long rate) in omap1_round_ext_clk_rate() argument
388 return 96000000 / calc_ext_dsor(rate); in omap1_round_ext_clk_rate()
406 clk-> rate = 96000000 / dsor; in omap1_init_ext_clk()
558 long omap1_clk_round_rate(struct clk *clk, unsigned long rate) in omap1_clk_round_rate() argument
561 return clk->round_rate(clk, rate); in omap1_clk_round_rate()
563 return clk->rate; in omap1_clk_round_rate()
566 int omap1_clk_set_rate(struct clk *clk, unsigned long rate) in omap1_clk_set_rate() argument
571 ret = clk->set_rate(clk, rate); in omap1_clk_set_rate()
657 ret = clk->rate; in clk_get_rate()
668 long clk_round_rate(struct clk *clk, unsigned long rate) in clk_round_rate() argument
677 ret = omap1_clk_round_rate(clk, rate); in clk_round_rate()
684 int clk_set_rate(struct clk *clk, unsigned long rate) in clk_set_rate() argument
693 ret = omap1_clk_set_rate(clk, rate); in clk_set_rate()
723 return clk->parent->rate; in followparent_recalc()
734 return clk->parent->rate / clk->fixed_div; in omap_fixed_divisor_recalc()
755 clkp->rate = clkp->recalc(clkp); in propagate_rate()
775 clkp->rate = clkp->recalc(clkp); in recalculate_root_clocks()
980 c->name, pa ? pa->name : "none", c->rate, in debug_clock_show()
999 debugfs_create_ulong("rate", S_IRUGO, c->dent, &c->rate); in clk_debugfs_register_one()