Lines Matching refs:rate
19 static void ccu_nkm_find_best(unsigned long parent, unsigned long rate,
33 if (tmp_rate > rate)
35 if ((rate - tmp_rate) < (rate - best_rate)) {
75 unsigned long n, m, k, rate;
98 rate = parent_rate * n * k / m;
101 rate /= nkm->fixed_post_div;
103 return rate;
109 unsigned long rate,
123 rate *= nkm->fixed_post_div;
125 ccu_nkm_find_best(*parent_rate, rate, &_nkm);
127 rate = *parent_rate * _nkm.n * _nkm.k / _nkm.m;
130 rate /= nkm->fixed_post_div;
132 return rate;
144 static int ccu_nkm_set_rate(struct clk_hw *hw, unsigned long rate,
153 rate *= nkm->fixed_post_div;
162 ccu_nkm_find_best(parent_rate, rate, &_nkm);