Lines Matching refs:rate
16 static void ccu_mp_find_best(unsigned long parent, unsigned long rate, in ccu_mp_find_best() argument
28 if (tmp_rate > rate) in ccu_mp_find_best()
31 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_mp_find_best()
46 unsigned long rate, in ccu_mp_round_rate() argument
54 rate *= cmp->fixed_post_div; in ccu_mp_round_rate()
59 ccu_mp_find_best(*parent_rate, rate, max_m, max_p, &m, &p); in ccu_mp_round_rate()
60 rate = *parent_rate / p / m; in ccu_mp_round_rate()
63 rate /= cmp->fixed_post_div; in ccu_mp_round_rate()
65 return rate; in ccu_mp_round_rate()
93 unsigned long rate; in ccu_mp_recalc_rate() local
112 rate = (parent_rate >> p) / m; in ccu_mp_recalc_rate()
114 rate /= cmp->fixed_post_div; in ccu_mp_recalc_rate()
116 return rate; in ccu_mp_recalc_rate()
128 static int ccu_mp_set_rate(struct clk_hw *hw, unsigned long rate, in ccu_mp_set_rate() argument
146 rate = rate * cmp->fixed_post_div; in ccu_mp_set_rate()
148 ccu_mp_find_best(parent_rate, rate, max_m, max_p, &m, &p); in ccu_mp_set_rate()
212 unsigned long rate = ccu_mp_recalc_rate(hw, parent_rate); in ccu_mp_mmc_recalc_rate() local
217 return rate / 2; in ccu_mp_mmc_recalc_rate()
218 return rate; in ccu_mp_mmc_recalc_rate()
230 req->rate *= 2; in ccu_mp_mmc_determine_rate()
239 req->rate /= 2; in ccu_mp_mmc_determine_rate()
247 static int ccu_mp_mmc_set_rate(struct clk_hw *hw, unsigned long rate, in ccu_mp_mmc_set_rate() argument
254 rate *= 2; in ccu_mp_mmc_set_rate()
256 return ccu_mp_set_rate(hw, rate, parent_rate); in ccu_mp_mmc_set_rate()