/linux/drivers/clk/spear/ |
H A D | clk-vco-pll.c | 94 for (*index = 0; *index < pll->vco->rtbl_cnt; (*index)++) { in clk_pll_round_rate_index() 97 *prate = pll_calc_rate(pll->vco->rtbl, vco_parent_rate, *index, in clk_pll_round_rate_index() 128 if (pll->vco->lock) in clk_pll_recalc_rate() 129 spin_lock_irqsave(pll->vco->lock, flags); in clk_pll_recalc_rate() 131 p = readl_relaxed(pll->vco->cfg_reg); in clk_pll_recalc_rate() 133 if (pll->vco->lock) in clk_pll_recalc_rate() 134 spin_unlock_irqrestore(pll->vco->lock, flags); in clk_pll_recalc_rate() 145 struct pll_rate_tbl *rtbl = pll->vco->rtbl; in clk_pll_set_rate() 151 if (pll->vco->lock) in clk_pll_set_rate() 152 spin_lock_irqsave(pll->vco->lock, flags); in clk_pll_set_rate() [all …]
|
H A D | Makefile | 6 obj-y += clk.o clk-aux-synth.o clk-frac-synth.o clk-gpt-synth.o clk-vco-pll.o
|
/linux/drivers/clk/versatile/ |
H A D | clk-icst.c | 63 static int vco_get(struct clk_icst *icst, struct icst_vco *vco) in vco_get() argument 81 vco->v = val & INTEGRATOR_AP_CM_BITS; in vco_get() 82 vco->r = 22; in vco_get() 83 vco->s = 1; in vco_get() 96 vco->v = val & INTEGRATOR_AP_SYS_BITS; in vco_get() 97 vco->r = 46; in vco_get() 98 vco->s = 3; in vco_get() 113 vco->v = divxy ? 17 : 14; in vco_get() 114 vco->r = divxy ? 22 : 14; in vco_get() 115 vco->s = 1; in vco_get() [all …]
|
H A D | icst.c | 27 unsigned long icst_hz(const struct icst_params *p, struct icst_vco vco) in icst_hz() argument 29 u64 dividend = p->ref * 2 * (u64)(vco.v + 8); in icst_hz() 30 u32 divisor = (vco.r + 2) * p->s2div[vco.s]; in icst_hz() 49 struct icst_vco vco = { .s = 1, .v = p->vd_max, .r = p->rd_max }; in icst_hz_to_vco() local 66 return vco; in icst_hz_to_vco() 68 vco.s = p->idx2s[i]; in icst_hz_to_vco() 91 vco.v = vd - 8; in icst_hz_to_vco() 92 vco.r = rd - 2; in icst_hz_to_vco() 99 return vco; in icst_hz_to_vco()
|
H A D | icst.h | 30 unsigned long icst_hz(const struct icst_params *p, struct icst_vco vco);
|
/linux/drivers/gpu/drm/i915/display/ |
H A D | intel_cdclk.c | 318 unsigned int vco; in intel_hpll_vco() local 338 vco = vco_table[tmp & 0x7]; in intel_hpll_vco() 339 if (vco == 0) in intel_hpll_vco() 343 drm_dbg_kms(display->drm, "HPLL VCO %u kHz\n", vco); in intel_hpll_vco() 345 return vco; in intel_hpll_vco() 360 cdclk_config->vco = intel_hpll_vco(display); in g33_get_cdclk() 369 switch (cdclk_config->vco) { in g33_get_cdclk() 386 cdclk_config->cdclk = DIV_ROUND_CLOSEST(cdclk_config->vco, in g33_get_cdclk() 393 cdclk_config->vco, tmp); in g33_get_cdclk() 442 cdclk_config->vco = intel_hpll_vco(display); in i965gm_get_cdclk() [all …]
|
H A D | intel_dpll.c | 36 } dot, vco, n, m, m1, m2, p, p1; member 45 .vco = { .min = 908000, .max = 1512000 }, 58 .vco = { .min = 908000, .max = 1512000 }, 71 .vco = { .min = 908000, .max = 1512000 }, 84 .vco = { .min = 1400000, .max = 2800000 }, 97 .vco = { .min = 1400000, .max = 2800000 }, 111 .vco = { .min = 1750000, .max = 3500000}, 126 .vco = { .min = 1750000, .max = 3500000}, 139 .vco = { .min = 1750000, .max = 3500000 }, 153 .vco = { .min = 1750000, .max = 3500000 }, [all …]
|
/linux/drivers/clk/berlin/ |
H A D | berlin2-avpll.c | 115 struct berlin2_avpll_vco *vco = to_avpll_vco(hw); in berlin2_avpll_vco_is_enabled() local 118 reg = readl_relaxed(vco->base + VCO_CTRL0); in berlin2_avpll_vco_is_enabled() 119 if (vco->flags & BERLIN2_AVPLL_BIT_QUIRK) in berlin2_avpll_vco_is_enabled() 127 struct berlin2_avpll_vco *vco = to_avpll_vco(hw); in berlin2_avpll_vco_enable() local 130 reg = readl_relaxed(vco->base + VCO_CTRL0); in berlin2_avpll_vco_enable() 131 if (vco->flags & BERLIN2_AVPLL_BIT_QUIRK) in berlin2_avpll_vco_enable() 135 writel_relaxed(reg, vco->base + VCO_CTRL0); in berlin2_avpll_vco_enable() 142 struct berlin2_avpll_vco *vco = to_avpll_vco(hw); in berlin2_avpll_vco_disable() local 145 reg = readl_relaxed(vco->base + VCO_CTRL0); in berlin2_avpll_vco_disable() 146 if (vco->flags & BERLIN2_AVPLL_BIT_QUIRK) in berlin2_avpll_vco_disable() [all …]
|
/linux/drivers/clk/ |
H A D | clk-si544.c | 203 u64 vco; in si544_calc_muldiv() local 228 vco = FVCO_MIN + ls_freq - 1; in si544_calc_muldiv() 229 do_div(vco, ls_freq); in si544_calc_muldiv() 230 settings->hs_div = vco; in si544_calc_muldiv() 238 vco = (u64)ls_freq * settings->hs_div; in si544_calc_muldiv() 241 tmp = do_div(vco, FXO); in si544_calc_muldiv() 242 settings->fb_div_int = vco; in si544_calc_muldiv() 245 vco = (u64)tmp << 32; in si544_calc_muldiv() 246 vco += FXO / 2; /* Round to nearest multiple */ in si544_calc_muldiv() 247 do_div(vco, FXO); in si544_calc_muldiv() [all …]
|
H A D | clk-lmk04832.c | 261 struct clk_hw vco; member 330 struct lmk04832 *lmk = container_of(hw, struct lmk04832, vco); in lmk04832_vco_is_enabled() 345 struct lmk04832 *lmk = container_of(hw, struct lmk04832, vco); in lmk04832_vco_prepare() 363 struct lmk04832 *lmk = container_of(hw, struct lmk04832, vco); in lmk04832_vco_unprepare() 377 struct lmk04832 *lmk = container_of(hw, struct lmk04832, vco); in lmk04832_vco_recalc_rate() 497 struct lmk04832 *lmk = container_of(hw, struct lmk04832, vco); in lmk04832_vco_round_rate() 521 struct lmk04832 *lmk = container_of(hw, struct lmk04832, vco); in lmk04832_vco_set_rate() 634 lmk->vco.init = &init; in lmk04832_register_vco() 635 return devm_clk_hw_register(lmk->dev, &lmk->vco); in lmk04832_register_vco() 959 parent_names[0] = clk_hw_get_name(&lmk->vco); in lmk04832_register_sclk() [all …]
|
/linux/drivers/clk/pistachio/ |
H A D | clk-pll.c | 199 u64 val, vco, old_postdiv1, old_postdiv2; in pll_gf40lp_frac_set_rate() local 210 vco = params->fref; in pll_gf40lp_frac_set_rate() 211 vco *= (params->fbdiv << 24) + params->frac; in pll_gf40lp_frac_set_rate() 212 vco = div64_u64(vco, params->refdiv << 24); in pll_gf40lp_frac_set_rate() 214 if (vco < MIN_VCO_FRAC_FRAC || vco > MAX_VCO_FRAC_FRAC) in pll_gf40lp_frac_set_rate() 215 pr_warn("%s: VCO %llu is out of range %lu..%lu\n", name, vco, in pll_gf40lp_frac_set_rate() 222 if (val > vco / 16) in pll_gf40lp_frac_set_rate() 224 name, val, vco / 16); in pll_gf40lp_frac_set_rate() 356 u32 val, vco, old_postdiv1, old_postdiv2; in pll_gf40lp_laint_set_rate() local 366 vco = div_u64(params->fref * params->fbdiv, params->refdiv); in pll_gf40lp_laint_set_rate() [all …]
|
/linux/drivers/clk/analogbits/ |
H A D | wrpll-cln28hpc.c | 230 u64 target_vco_rate, delta, best_delta, f_pre_div, vco, vco_pre; in wrpll_configure_for_rate() local 284 vco = vco_pre * f; in wrpll_configure_for_rate() 287 if (vco > target_vco_rate) { in wrpll_configure_for_rate() 289 vco = vco_pre * f; in wrpll_configure_for_rate() 290 } else if (vco < MIN_VCO_FREQ) { in wrpll_configure_for_rate() 292 vco = vco_pre * f; in wrpll_configure_for_rate() 295 delta = abs(target_rate - vco); in wrpll_configure_for_rate()
|
/linux/drivers/video/fbdev/matrox/ |
H A D | g450_pll.c | 106 unsigned int *vco, unsigned int fout) in g450_firstpll() argument 114 *vco = vcomax; in g450_firstpll() 116 *vco = fout; in g450_firstpll() 131 *vco = tvco; in g450_firstpll() 133 return g450_nextpll(minfo, pi, vco, 0xFF0000 | p); in g450_firstpll() 437 unsigned int vco; in __g450_setclk() local 440 vco = g450_mnp2vco(minfo, mnp); in __g450_setclk() 441 delta = pll_freq_delta(fout, g450_vco2f(mnp, vco)); in __g450_setclk() 453 && vco != g450_mnp2vco(minfo, mnparray[idx-1]) in __g450_setclk() 454 && vco < (pi->vcomin * 17 / 16)) { in __g450_setclk()
|
/linux/drivers/clk/bcm/ |
H A D | clk-iproc-pll.c | 277 struct iproc_pll_vco_param *vco) in pll_fractional_change_only() argument 293 if (ndiv_int != vco->ndiv_int) in pll_fractional_change_only() 299 if (pdiv != vco->pdiv) in pll_fractional_change_only() 305 static int pll_set_rate(struct iproc_clk *clk, struct iproc_pll_vco_param *vco, in pll_set_rate() argument 311 unsigned long rate = vco->rate; in pll_set_rate() 321 if (vco->pdiv == 0) in pll_set_rate() 324 ref_freq = parent_rate / vco->pdiv; in pll_set_rate() 354 if (pll_fractional_change_only(clk->pll, vco)) { in pll_set_rate() 360 val |= vco->ndiv_frac << ctrl->ndiv_frac.shift; in pll_set_rate() 397 val |= vco->ndiv_int << ctrl->ndiv_int.shift; in pll_set_rate() [all …]
|
/linux/drivers/gpu/drm/gma500/ |
H A D | cdv_intel_display.c | 38 .vco = {.min = 1800000, .max = 3600000}, 50 .vco = {.min = 1800000, .max = 3600000}, 65 .vco = {.min = 1809000, .max = 3564000}, 77 .vco = {.min = 1800000, .max = 3600000}, 89 .vco = {.min = 1809000, .max = 3564000}, 101 .vco = {.min = 1800000, .max = 3600000}, 290 if (clock->vco < 2250000) { in cdv_dpll_set_clock_cdv() 293 } else if (clock->vco < 2750000) { in cdv_dpll_set_clock_cdv() 296 } else if (clock->vco < 3300000) { in cdv_dpll_set_clock_cdv() 397 clock->vco = (refclk * clock->m) / clock->n; in cdv_intel_clock() [all …]
|
H A D | gma_display.h | 26 int vco; member 41 struct gma_range_t dot, vco, n, m, m1, m2, p, p1; member
|
H A D | psb_intel_display.c | 29 .vco = {.min = 1400000, .max = 2800000}, 41 .vco = {.min = 1400000, .max = 2800000}, 72 clock->vco = refclk * clock->m / (clock->n + 2); in psb_intel_clock() 73 clock->dot = clock->vco / clock->p; in psb_intel_clock()
|
/linux/drivers/gpu/drm/mgag200/ |
H A D | mgag200_g200er.c | 74 unsigned int computed, vco; in mgag200_g200er_pixpllc_atomic_check() local 89 vco = pllreffreq * (testn + 1) / in mgag200_g200er_pixpllc_atomic_check() 91 if (vco < vcomin) in mgag200_g200er_pixpllc_atomic_check() 93 if (vco > vcomax) in mgag200_g200er_pixpllc_atomic_check() 95 computed = vco / (m_div_val[testm] * (testo + 1)); in mgag200_g200er_pixpllc_atomic_check()
|
/linux/arch/powerpc/boot/ |
H A D | 4xx.c | 406 u32 cpu, plb, opb, ebc, vco; in __ibm440eplike_fixup_clocks() local 433 vco = sys_clk * m; in __ibm440eplike_fixup_clocks() 434 clk_a = vco / fwdva; in __ibm440eplike_fixup_clocks() 435 clk_b = vco / fwdvb; in __ibm440eplike_fixup_clocks() 439 vco = 0; in __ibm440eplike_fixup_clocks()
|
/linux/drivers/clk/mediatek/ |
H A D | clk-pll.c | 46 u64 vco; in __mtk_pll_recalc_rate() local 54 vco = (u64)fin * pcw; in __mtk_pll_recalc_rate() 56 if (pcwfbits && (vco & GENMASK(pcwfbits - 1, 0))) in __mtk_pll_recalc_rate() 59 vco >>= pcwfbits; in __mtk_pll_recalc_rate() 62 vco++; in __mtk_pll_recalc_rate() 64 return ((unsigned long)vco + postdiv - 1) / postdiv; in __mtk_pll_recalc_rate()
|
/linux/drivers/media/i2c/ |
H A D | mt9t112.c | 278 u32 vco, clk; in mt9t112_clock_info() local 307 vco = 2 * m * ext / (n + 1); in mt9t112_clock_info() 308 enable = ((vco < 384000) || (vco > 768000)) ? "X" : ""; in mt9t112_clock_info() 309 dev_dbg(&client->dev, "VCO : %10u K %s\n", vco, enable); in mt9t112_clock_info() 311 clk = vco / (p1 + 1) / (p2 + 1); in mt9t112_clock_info() 315 clk = vco / (p3 + 1); in mt9t112_clock_info() 319 clk = vco / (p6 + 1); in mt9t112_clock_info() 323 clk = vco / (p5 + 1); in mt9t112_clock_info() 327 clk = vco / (p4 + 1); in mt9t112_clock_info() 331 clk = vco / (p7 + 1); in mt9t112_clock_info()
|
/linux/arch/arm/boot/dts/arm/ |
H A D | arm-realview-pb11mp.dts | 346 vco-offset = <0x0C>; 354 vco-offset = <0x10>; 362 vco-offset = <0x14>; 370 vco-offset = <0x18>; 378 vco-offset = <0x1c>; 386 vco-offset = <0xd4>; 394 vco-offset = <0xd8>;
|
H A D | arm-realview-eb.dtsi | 237 vco-offset = <0x0C>; 245 vco-offset = <0x10>; 253 vco-offset = <0x14>; 261 vco-offset = <0x18>; 269 vco-offset = <0x1c>;
|
H A D | integratorap.dts | 88 vco-offset = <0x08>; 98 vco-offset = <0x1c>; 119 vco-offset = <0x04>; 129 vco-offset = <0x04>;
|
/linux/drivers/media/tuners/ |
H A D | max2165.c | 224 u8 vco, vco_sub_band, adc; in max2165_debug_status() local 236 vco = autotune >> 6; in max2165_debug_status() 246 dprintk("VCO: %d, VCO Sub-band: %d, ADC: %d\n", vco, vco_sub_band, adc); in max2165_debug_status()
|