Lines Matching refs:rate
18 static void ccu_nk_find_best(unsigned long parent, unsigned long rate,
29 if (tmp_rate > rate)
32 if ((rate - tmp_rate) < (rate - best_rate)) {
69 unsigned long rate, n, k;
86 rate = parent_rate * n * k;
88 rate /= nk->fixed_post_div;
90 return rate;
93 static long ccu_nk_round_rate(struct clk_hw *hw, unsigned long rate,
100 rate *= nk->fixed_post_div;
107 ccu_nk_find_best(*parent_rate, rate, &_nk);
108 rate = *parent_rate * _nk.n * _nk.k;
111 rate = rate / nk->fixed_post_div;
113 return rate;
116 static int ccu_nk_set_rate(struct clk_hw *hw, unsigned long rate,
125 rate = rate * nk->fixed_post_div;
132 ccu_nk_find_best(parent_rate, rate, &_nk);