/linux/drivers/clk/rockchip/ |
H A D | clk-half-divider.c | 39 unsigned int i, bestdiv = 0; in clk_half_divider_bestdiv() local 50 bestdiv = DIV_ROUND_UP_ULL(((u64)parent_rate * 2), rate); in clk_half_divider_bestdiv() 51 if (bestdiv < 3) in clk_half_divider_bestdiv() 52 bestdiv = 0; in clk_half_divider_bestdiv() 54 bestdiv = (bestdiv - 3) / 2; in clk_half_divider_bestdiv() 55 bestdiv = bestdiv > maxdiv ? maxdiv : bestdiv; in clk_half_divider_bestdiv() 56 return bestdiv; in clk_half_divider_bestdiv() [all...] |
/linux/drivers/clk/zynqmp/ |
H A D | divider.c | 129 u32 bestdiv; in zynqmp_clk_divider_round_rate() local 135 ret = zynqmp_pm_clock_getdivider(clk_id, &bestdiv); in zynqmp_clk_divider_round_rate() 141 bestdiv = bestdiv & 0xFFFF; in zynqmp_clk_divider_round_rate() 143 bestdiv = bestdiv >> 16; in zynqmp_clk_divider_round_rate() 146 bestdiv = 1 << bestdiv; in zynqmp_clk_divider_round_rate() 148 return DIV_ROUND_UP_ULL((u64)*prate, bestdiv); in zynqmp_clk_divider_round_rate()
|
/linux/drivers/clk/ti/ |
H A D | divider.c | 172 int i, bestdiv = 0; in ti_clk_divider_bestdiv() local 183 bestdiv = _div_round(divider->table, parent_rate, rate); in ti_clk_divider_bestdiv() 184 bestdiv = bestdiv == 0 ? 1 : bestdiv; in ti_clk_divider_bestdiv() 185 bestdiv = bestdiv > maxdiv ? maxdiv : bestdiv; in ti_clk_divider_bestdiv() 186 return bestdiv; in ti_clk_divider_bestdiv() 211 bestdiv in ti_clk_divider_bestdiv() [all...] |
/linux/drivers/clk/ |
H A D | clk-divider.c | 301 int i, bestdiv = 0; in clk_divider_bestdiv() local 312 bestdiv = _div_round(table, parent_rate, rate, flags); in clk_divider_bestdiv() 313 bestdiv = bestdiv == 0 ? 1 : bestdiv; in clk_divider_bestdiv() 314 bestdiv = bestdiv > maxdiv ? maxdiv : bestdiv; in clk_divider_bestdiv() 315 return bestdiv; in clk_divider_bestdiv() 338 bestdiv in clk_divider_bestdiv() [all...] |
H A D | clk-versaclock3.c | 506 unsigned int bestdiv; in vc3_div_round_rate() local 510 regmap_read(vc3->regmap, div_data->offs, &bestdiv); in vc3_div_round_rate() 511 bestdiv >>= div_data->shift; in vc3_div_round_rate() 512 bestdiv &= VC3_DIV_MASK(div_data->width); in vc3_div_round_rate() 513 bestdiv = vc3_get_div(div_data->table, bestdiv, div_data->flags); in vc3_div_round_rate() 514 return DIV_ROUND_UP(*parent_rate, bestdiv); in vc3_div_round_rate()
|
/linux/drivers/clk/meson/ |
H A D | sclk-div.c | 54 int bestdiv = 0, i; in sclk_div_bestdiv() local 85 bestdiv = i; in sclk_div_bestdiv() 91 if (!bestdiv) in sclk_div_bestdiv() 92 bestdiv = sclk_div_maxdiv(sclk); in sclk_div_bestdiv() 96 return bestdiv; in sclk_div_bestdiv()
|
/linux/drivers/clk/at91/ |
H A D | clk-pll.c | 134 unsigned long bestdiv; in clk_pll_get_best_div_mul() local 197 bestdiv = tmpdiv; in clk_pll_get_best_div_mul() 225 *div = bestdiv; in clk_pll_get_best_div_mul()
|
/linux/drivers/clk/bcm/ |
H A D | clk-iproc-pll.c | 639 unsigned int bestdiv; in iproc_clk_determine_rate() local 646 bestdiv = DIV_ROUND_CLOSEST(req->best_parent_rate, req->rate); in iproc_clk_determine_rate() 647 if (bestdiv < 2) in iproc_clk_determine_rate() 650 if (bestdiv > 256) in iproc_clk_determine_rate() 651 bestdiv = 256; in iproc_clk_determine_rate() 653 req->rate = req->best_parent_rate / bestdiv; in iproc_clk_determine_rate()
|
/linux/drivers/clk/sophgo/ |
H A D | clk-sg2042-clkgen.c | 185 u32 bestdiv; in sg2042_clk_divider_round_rate() local 190 bestdiv = divider->initval; in sg2042_clk_divider_round_rate() 192 bestdiv = readl(divider->reg) >> divider->shift; in sg2042_clk_divider_round_rate() 193 bestdiv &= clk_div_mask(divider->width); in sg2042_clk_divider_round_rate() 195 ret_rate = DIV_ROUND_UP_ULL((u64)*prate, bestdiv); in sg2042_clk_divider_round_rate()
|
/linux/drivers/clk/nxp/ |
H A D | clk-lpc32xx.c | 962 unsigned int bestdiv; in clk_divider_round_rate() local 966 regmap_read(clk_regmap, divider->reg, &bestdiv); in clk_divider_round_rate() 967 bestdiv >>= divider->shift; in clk_divider_round_rate() 968 bestdiv &= div_mask(divider->width); in clk_divider_round_rate() 969 bestdiv = _get_div(divider->table, bestdiv, divider->flags, in clk_divider_round_rate() 971 return DIV_ROUND_UP(*prate, bestdiv); in clk_divider_round_rate()
|
/linux/drivers/gpu/drm/i915/display/ |
H A D | intel_dpll_mgr.c | 2513 static void icl_wrpll_get_multipliers(int bestdiv, int *pdiv, in icl_wrpll_get_multipliers() argument 2517 if (bestdiv % 2 == 0) { in icl_wrpll_get_multipliers() 2518 if (bestdiv == 2) { in icl_wrpll_get_multipliers() 2522 } else if (bestdiv % 4 == 0) { in icl_wrpll_get_multipliers() 2524 *qdiv = bestdiv / 4; in icl_wrpll_get_multipliers() 2526 } else if (bestdiv % 6 == 0) { in icl_wrpll_get_multipliers() 2528 *qdiv = bestdiv / 6; in icl_wrpll_get_multipliers() 2530 } else if (bestdiv % 5 == 0) { in icl_wrpll_get_multipliers() 2532 *qdiv = bestdiv / 10; in icl_wrpll_get_multipliers() 2534 } else if (bestdiv in icl_wrpll_get_multipliers() [all...] |