| /OK3568_Linux_fs/kernel/drivers/clk/zynqmp/ |
| H A D | divider.c | 115 int *bestdiv) in zynqmp_get_divider2_val() argument 134 *bestdiv = 1; in zynqmp_get_divider2_val() 140 *bestdiv = div2; in zynqmp_get_divider2_val() 171 u32 bestdiv; in zynqmp_clk_divider_round_rate() local 176 ret = zynqmp_pm_clock_getdivider(clk_id, &bestdiv); in zynqmp_clk_divider_round_rate() 182 bestdiv = bestdiv & 0xFFFF; in zynqmp_clk_divider_round_rate() 184 bestdiv = bestdiv >> 16; in zynqmp_clk_divider_round_rate() 187 bestdiv = 1 << bestdiv; in zynqmp_clk_divider_round_rate() 189 return DIV_ROUND_UP_ULL((u64)*prate, bestdiv); in zynqmp_clk_divider_round_rate() 192 bestdiv = zynqmp_divider_get_val(*prate, rate, divider->flags); in zynqmp_clk_divider_round_rate() [all …]
|
| /OK3568_Linux_fs/kernel/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 = DIV_ROUND_UP(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() 73 bestdiv = i; in clk_half_divider_bestdiv() 80 bestdiv = div_mask(width); in clk_half_divider_bestdiv() 84 return bestdiv; in clk_half_divider_bestdiv()
|
| /OK3568_Linux_fs/kernel/drivers/clk/ti/ |
| H A D | divider.c | 180 int i, bestdiv = 0; in ti_clk_divider_bestdiv() local 191 bestdiv = _div_round(divider->table, parent_rate, rate); in ti_clk_divider_bestdiv() 192 bestdiv = bestdiv == 0 ? 1 : bestdiv; in ti_clk_divider_bestdiv() 193 bestdiv = bestdiv > maxdiv ? maxdiv : bestdiv; in ti_clk_divider_bestdiv() 194 return bestdiv; in ti_clk_divider_bestdiv() 219 bestdiv = i; in ti_clk_divider_bestdiv() 225 if (!bestdiv) { in ti_clk_divider_bestdiv() 226 bestdiv = divider->max; in ti_clk_divider_bestdiv() 231 return bestdiv; in ti_clk_divider_bestdiv()
|
| /OK3568_Linux_fs/kernel/drivers/clk/ |
| H A D | clk-divider.c | 294 int i, bestdiv = 0; in clk_divider_bestdiv() local 305 bestdiv = _div_round(table, parent_rate, rate, flags); in clk_divider_bestdiv() 306 bestdiv = bestdiv == 0 ? 1 : bestdiv; in clk_divider_bestdiv() 307 bestdiv = bestdiv > maxdiv ? maxdiv : bestdiv; in clk_divider_bestdiv() 308 return bestdiv; in clk_divider_bestdiv() 331 bestdiv = i; in clk_divider_bestdiv() 337 if (!bestdiv) { in clk_divider_bestdiv() 338 bestdiv = _get_maxdiv(table, width, flags); in clk_divider_bestdiv() 342 return bestdiv; in clk_divider_bestdiv()
|
| /OK3568_Linux_fs/kernel/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()
|
| /OK3568_Linux_fs/kernel/drivers/clk/at91/ |
| H A D | clk-pll.c | 133 unsigned long bestdiv; in clk_pll_get_best_div_mul() local 196 bestdiv = tmpdiv; in clk_pll_get_best_div_mul() 224 *div = bestdiv; in clk_pll_get_best_div_mul()
|
| /OK3568_Linux_fs/kernel/drivers/clk/bcm/ |
| H A D | clk-iproc-pll.c | 649 unsigned int bestdiv; in iproc_clk_determine_rate() local 656 bestdiv = DIV_ROUND_CLOSEST(req->best_parent_rate, req->rate); in iproc_clk_determine_rate() 657 if (bestdiv < 2) in iproc_clk_determine_rate() 660 if (bestdiv > 256) in iproc_clk_determine_rate() 661 bestdiv = 256; in iproc_clk_determine_rate() 663 req->rate = req->best_parent_rate / bestdiv; in iproc_clk_determine_rate()
|
| /OK3568_Linux_fs/kernel/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()
|
| /OK3568_Linux_fs/kernel/drivers/gpu/drm/i915/display/ |
| H A D | intel_dpll_mgr.c | 2458 static void cnl_wrpll_get_multipliers(int bestdiv, int *pdiv, in cnl_wrpll_get_multipliers() argument 2462 if (bestdiv % 2 == 0) { in cnl_wrpll_get_multipliers() 2463 if (bestdiv == 2) { in cnl_wrpll_get_multipliers() 2467 } else if (bestdiv % 4 == 0) { in cnl_wrpll_get_multipliers() 2469 *qdiv = bestdiv / 4; in cnl_wrpll_get_multipliers() 2471 } else if (bestdiv % 6 == 0) { in cnl_wrpll_get_multipliers() 2473 *qdiv = bestdiv / 6; in cnl_wrpll_get_multipliers() 2475 } else if (bestdiv % 5 == 0) { in cnl_wrpll_get_multipliers() 2477 *qdiv = bestdiv / 10; in cnl_wrpll_get_multipliers() 2479 } else if (bestdiv % 14 == 0) { in cnl_wrpll_get_multipliers() [all …]
|