Home
last modified time | relevance | path

Searched refs:maxdiv (Results 1 – 11 of 11) sorted by relevance

/linux-6.1.9/drivers/clk/meson/
Dsclk-div.c42 unsigned long prate, int maxdiv) in sclk_div_getdiv() argument
46 return clamp(div, 2, maxdiv); in sclk_div_getdiv()
55 unsigned long maxdiv, now, parent_now; in sclk_div_bestdiv() local
61 maxdiv = sclk_div_maxdiv(sclk); in sclk_div_bestdiv()
64 return sclk_div_getdiv(hw, rate, *prate, maxdiv); in sclk_div_bestdiv()
70 maxdiv = min(ULONG_MAX / rate, maxdiv); in sclk_div_bestdiv()
72 for (i = 2; i <= maxdiv; i++) { in sclk_div_bestdiv()
171 unsigned long maxdiv = sclk_div_maxdiv(sclk); in sclk_div_set_rate() local
173 sclk->cached_div = sclk_div_getdiv(hw, rate, prate, maxdiv); in sclk_div_set_rate()
/linux-6.1.9/drivers/clk/rockchip/
Dclk-half-divider.c40 unsigned long parent_rate, best = 0, now, maxdiv; in clk_half_divider_bestdiv() local
46 maxdiv = div_mask(width); in clk_half_divider_bestdiv()
55 bestdiv = bestdiv > maxdiv ? maxdiv : bestdiv; in clk_half_divider_bestdiv()
63 maxdiv = min(ULONG_MAX / rate, maxdiv); in clk_half_divider_bestdiv()
65 for (i = 0; i <= maxdiv; i++) { in clk_half_divider_bestdiv()
/linux-6.1.9/drivers/clk/
Dclk-divider.c48 unsigned int maxdiv = 0, mask = clk_div_mask(width); in _get_table_maxdiv() local
52 if (clkt->div > maxdiv && clkt->val <= mask) in _get_table_maxdiv()
53 maxdiv = clkt->div; in _get_table_maxdiv()
54 return maxdiv; in _get_table_maxdiv()
296 unsigned long parent_rate, best = 0, now, maxdiv; in clk_divider_bestdiv() local
302 maxdiv = _get_maxdiv(table, width, flags); in clk_divider_bestdiv()
308 bestdiv = bestdiv > maxdiv ? maxdiv : bestdiv; in clk_divider_bestdiv()
316 maxdiv = min(ULONG_MAX / rate, maxdiv); in clk_divider_bestdiv()
318 for (i = _next_div(table, 0, flags); i <= maxdiv; in clk_divider_bestdiv()
/linux-6.1.9/arch/mips/alchemy/common/
Dclock.c377 int scale, int maxdiv, unsigned long *rv) in alchemy_calc_div() argument
392 if (div2 > maxdiv) in alchemy_calc_div()
393 div2 = maxdiv; in alchemy_calc_div()
403 int scale, int maxdiv) in alchemy_clk_fgcs_detr() argument
437 tdv = alchemy_calc_div(req->rate, pr, scale, maxdiv, NULL); in alchemy_clk_fgcs_detr()
458 for (j = (maxdiv == 4) ? 1 : scale; j <= maxdiv; j += scale) { in alchemy_clk_fgcs_detr()
464 tdv = alchemy_calc_div(req->rate, pr, scale, maxdiv, in alchemy_clk_fgcs_detr()
713 int scale, maxdiv; in alchemy_clk_fgv2_detr() local
717 maxdiv = 256; in alchemy_clk_fgv2_detr()
720 maxdiv = 512; in alchemy_clk_fgv2_detr()
[all …]
/linux-6.1.9/drivers/clk/sunxi-ng/
Dccu_mp.c50 unsigned long maxdiv; in ccu_mp_find_best_with_parent_adj() local
58 maxdiv = max_m * max_p; in ccu_mp_find_best_with_parent_adj()
59 maxdiv = min(ULONG_MAX / rate, maxdiv); in ccu_mp_find_best_with_parent_adj()
65 if (div > maxdiv) in ccu_mp_find_best_with_parent_adj()
/linux-6.1.9/drivers/clk/ti/
Ddivider.c173 unsigned long parent_rate, best = 0, now, maxdiv; in ti_clk_divider_bestdiv() local
179 maxdiv = divider->max; in ti_clk_divider_bestdiv()
185 bestdiv = bestdiv > maxdiv ? maxdiv : bestdiv; in ti_clk_divider_bestdiv()
193 maxdiv = min(ULONG_MAX / rate, maxdiv); in ti_clk_divider_bestdiv()
195 for (i = 1; i <= maxdiv; i++) { in ti_clk_divider_bestdiv()
/linux-6.1.9/drivers/clk/at91/
Dclk-pll.c132 unsigned long maxdiv, mindiv, tmpdiv; in clk_pll_get_best_div_mul() local
165 maxdiv = DIV_ROUND_UP(parent_rate * PLL_MUL_MAX(layout), rate); in clk_pll_get_best_div_mul()
166 if (maxdiv > PLL_DIV_MAX) in clk_pll_get_best_div_mul()
167 maxdiv = PLL_DIV_MAX; in clk_pll_get_best_div_mul()
174 for (tmpdiv = mindiv; tmpdiv <= maxdiv; tmpdiv++) { in clk_pll_get_best_div_mul()
/linux-6.1.9/drivers/clk/mmp/
Dclk-mix.c27 unsigned int maxdiv = 0; in _get_maxdiv() local
36 if (clkt->div > maxdiv) in _get_maxdiv()
37 maxdiv = clkt->div; in _get_maxdiv()
38 return maxdiv; in _get_maxdiv()
/linux-6.1.9/arch/arm/mach-ep93xx/
Dclock.c372 unsigned long best = 0, now, maxdiv; in ep93xx_div_round_rate() local
375 maxdiv = psc->div[psc->num_div - 1]; in ep93xx_div_round_rate()
388 best = DIV_ROUND_UP_ULL(*parent_rate, maxdiv); in ep93xx_div_round_rate()
/linux-6.1.9/drivers/clk/bcm/
Dclk-bcm2835.c945 u32 div, mindiv, maxdiv; in bcm2835_clock_choose_div() local
956 maxdiv = (BIT(data->int_bits) - 1) << CM_DIV_FRAC_BITS; in bcm2835_clock_choose_div()
961 maxdiv = GENMASK(data->int_bits + CM_DIV_FRAC_BITS - 1, in bcm2835_clock_choose_div()
967 div = min_t(u32, div, maxdiv); in bcm2835_clock_choose_div()
1150 u32 curdiv, mindiv, maxdiv; in bcm2835_clock_choose_div_and_prate() local
1186 maxdiv = BIT(data->int_bits) - 1; in bcm2835_clock_choose_div_and_prate()
1189 for (curdiv = mindiv; curdiv <= maxdiv; curdiv++) { in bcm2835_clock_choose_div_and_prate()
/linux-6.1.9/drivers/tty/serial/
Dqcom_geni_serial.c965 unsigned long div, maxdiv; in find_clk_rate_in_tol() local
970 maxdiv = CLK_DIV_MSK >> CLK_DIV_SHFT; in find_clk_rate_in_tol()
972 while (div <= maxdiv) { in find_clk_rate_in_tol()