Lines Matching refs:div
29 #define CDCE706_DIVIDER(div) (13 + (div)) argument
50 #define CDCE706_DIVIDER_PLL(div) (9 + (div) - ((div) > 2) - ((div) > 4)) argument
51 #define CDCE706_DIVIDER_PLL_SHIFT(div) ((div) < 2 ? 5 : 3 * ((div) & 1)) argument
52 #define CDCE706_DIVIDER_PLL_MASK(div) (0x7 << CDCE706_DIVIDER_PLL_SHIFT(div)) argument
72 unsigned div; member
170 __func__, hwd->idx, hwd->mux, hwd->mul, hwd->div); in cdce706_pll_recalc_rate()
173 if (hwd->div && hwd->mul) { in cdce706_pll_recalc_rate()
176 do_div(res, hwd->div); in cdce706_pll_recalc_rate()
180 if (hwd->div) in cdce706_pll_recalc_rate()
181 return parent_rate / hwd->div; in cdce706_pll_recalc_rate()
190 unsigned long mul, div; in cdce706_pll_round_rate() local
199 &mul, &div); in cdce706_pll_round_rate()
201 hwd->div = div; in cdce706_pll_round_rate()
205 __func__, hwd->idx, mul, div); in cdce706_pll_round_rate()
208 do_div(res, hwd->div); in cdce706_pll_round_rate()
216 unsigned long mul = hwd->mul, div = hwd->div; in cdce706_pll_set_rate() local
221 __func__, hwd->idx, mul, div); in cdce706_pll_set_rate()
226 ((div >> 8) & CDCE706_PLL_HI_M_MASK) | in cdce706_pll_set_rate()
234 div & CDCE706_PLL_LOW_M_MASK); in cdce706_pll_set_rate()
285 __func__, hwd->idx, hwd->div); in cdce706_divider_recalc_rate()
286 if (hwd->div) in cdce706_divider_recalc_rate()
287 return parent_rate / hwd->div; in cdce706_divider_recalc_rate()
297 unsigned long mul, div; in cdce706_divider_determine_rate() local
305 &mul, &div); in cdce706_divider_determine_rate()
307 div = CDCE706_DIVIDER_DIVIDER_MAX; in cdce706_divider_determine_rate()
315 for (div = CDCE706_PLL_FREQ_MIN / rate; best_diff && in cdce706_divider_determine_rate()
316 div <= CDCE706_PLL_FREQ_MAX / rate; ++div) { in cdce706_divider_determine_rate()
322 if (rate * div < CDCE706_PLL_FREQ_MIN) in cdce706_divider_determine_rate()
325 rational_best_approximation(rate * div, gp_rate, in cdce706_divider_determine_rate()
331 do_div(div_rate64, div); in cdce706_divider_determine_rate()
337 best_div = div; in cdce706_divider_determine_rate()
340 __func__, gp_rate, n, m, div, div_rate); in cdce706_divider_determine_rate()
344 div = best_div; in cdce706_divider_determine_rate()
348 __func__, req->best_parent_rate, rate * div); in cdce706_divider_determine_rate()
349 req->best_parent_rate = rate * div; in cdce706_divider_determine_rate()
351 hwd->div = div; in cdce706_divider_determine_rate()
355 __func__, hwd->idx, div); in cdce706_divider_determine_rate()
357 req->rate = req->best_parent_rate / div; in cdce706_divider_determine_rate()
368 __func__, hwd->idx, hwd->div); in cdce706_divider_set_rate()
373 hwd->div); in cdce706_divider_set_rate()
541 cdce->pll[i].div = m | ((v & CDCE706_PLL_HI_M_MASK) << 8); in cdce706_register_plls()
547 cdce->pll[i].div, cdce->pll[i].mul, cdce->pll[i].mux); in cdce706_register_plls()
580 cdce->divider[i].div = val & CDCE706_DIVIDER_DIVIDER_MASK; in cdce706_register_dividers()
583 cdce->divider[i].parent, cdce->divider[i].div); in cdce706_register_dividers()