Lines Matching refs:rate
18 static unsigned long ccu_nk_find_best(unsigned long parent, unsigned long rate,
29 if (tmp_rate > rate)
32 if ((rate - tmp_rate) < (rate - best_rate)) {
71 unsigned long rate, n, k;
88 rate = parent_rate * n * k;
90 rate /= nk->fixed_post_div;
92 return rate;
95 static long ccu_nk_round_rate(struct clk_hw *hw, unsigned long rate,
102 rate *= nk->fixed_post_div;
109 rate = ccu_nk_find_best(*parent_rate, rate, &_nk);
112 rate = rate / nk->fixed_post_div;
114 return rate;
117 static int ccu_nk_set_rate(struct clk_hw *hw, unsigned long rate,
126 rate = rate * nk->fixed_post_div;
133 ccu_nk_find_best(parent_rate, rate, &_nk);