Home
last modified time | relevance | path

Searched refs:refdiv (Results 1 – 24 of 24) sorted by relevance

/linux-6.1.9/drivers/clk/mmp/
Dclk-pll.c49 u32 fbdiv, refdiv, postdiv; in mmp_clk_pll_recalc_rate() local
60 refdiv = (val >> (pll->shift + 9)) & 0x1f; in mmp_clk_pll_recalc_rate()
63 refdiv = 1; in mmp_clk_pll_recalc_rate()
75 do_div(rate, refdiv); in mmp_clk_pll_recalc_rate()
79 if (refdiv == 3) { in mmp_clk_pll_recalc_rate()
81 } else if (refdiv == 4) { in mmp_clk_pll_recalc_rate()
84 pr_err("bad refdiv: %d (0x%08x)\n", refdiv, val); in mmp_clk_pll_recalc_rate()
89 do_div(rate, refdiv + 2); in mmp_clk_pll_recalc_rate()
/linux-6.1.9/drivers/clk/rockchip/
Dclk-pll.c151 rate->refdiv = ((pllcon >> RK3036_PLLCON1_REFDIV_SHIFT) in rockchip_rk3036_pll_get_params()
173 do_div(rate64, cur.refdiv); in rockchip_rk3036_pll_recalc_rate()
179 do_div(frac_rate64, cur.refdiv); in rockchip_rk3036_pll_recalc_rate()
201 __func__, rate->rate, rate->fbdiv, rate->postdiv1, rate->refdiv, in rockchip_rk3036_pll_set_params()
220 writel_relaxed(HIWORD_UPDATE(rate->refdiv, RK3036_PLLCON1_REFDIV_MASK, in rockchip_rk3036_pll_set_params()
318 cur.fbdiv, cur.postdiv1, cur.refdiv, cur.postdiv2, in rockchip_rk3036_pll_init()
321 rate->fbdiv, rate->postdiv1, rate->refdiv, rate->postdiv2, in rockchip_rk3036_pll_init()
325 rate->refdiv != cur.refdiv || rate->postdiv2 != cur.postdiv2 || in rockchip_rk3036_pll_init()
629 rate->refdiv = ((pllcon >> RK3399_PLLCON1_REFDIV_SHIFT) in rockchip_rk3399_pll_get_params()
655 do_div(rate64, cur.refdiv); in rockchip_rk3399_pll_recalc_rate()
[all …]
Dclk.h251 .refdiv = _refdiv, \
305 unsigned int refdiv; member
/linux-6.1.9/arch/mips/ath25/
Dar2315.c207 unsigned int pllc_out, refdiv, fdiv, divby2; in ar2315_sys_clk() local
211 refdiv = ATH25_REG_MS(pllc_ctrl, AR2315_PLLC_REF_DIV); in ar2315_sys_clk()
212 refdiv = clockctl1_predivide_table[refdiv]; in ar2315_sys_clk()
215 pllc_out = (40000000 / refdiv) * (2 * divby2) * fdiv; in ar2315_sys_clk()
/linux-6.1.9/drivers/clk/pistachio/
Dclk-pll.c206 if (!params || !params->refdiv) in pll_gf40lp_frac_set_rate()
212 vco = div64_u64(vco, params->refdiv << 24); in pll_gf40lp_frac_set_rate()
218 val = div64_u64(params->fref, params->refdiv); in pll_gf40lp_frac_set_rate()
229 val |= (params->refdiv << PLL_CTRL1_REFDIV_SHIFT) | in pll_gf40lp_frac_set_rate()
363 if (!params || !params->refdiv) in pll_gf40lp_laint_set_rate()
366 vco = div_u64(params->fref * params->fbdiv, params->refdiv); in pll_gf40lp_laint_set_rate()
371 val = div_u64(params->fref, params->refdiv); in pll_gf40lp_laint_set_rate()
397 val |= (params->refdiv << PLL_CTRL1_REFDIV_SHIFT) | in pll_gf40lp_laint_set_rate()
Dclk.h97 unsigned long long refdiv; member
/linux-6.1.9/drivers/clk/visconti/
Dpll.h29 .refdiv = _refdiv, \
40 unsigned int refdiv; member
Dpll.c68 rate_table->refdiv = readl(pll->pll_base + PLL_REFDIV_REG) & PLL_REFDIV_MASK; in visconti_pll_get_params()
138 writel(rate_table->refdiv, pll->pll_base + PLL_REFDIV_REG); in visconti_pll_set_params()
/linux-6.1.9/drivers/clk/berlin/
Dberlin2-avpll.c159 u32 reg, refdiv, fbdiv; in berlin2_avpll_vco_recalc_rate() local
164 refdiv = (reg & VCO_REFDIV_MASK) >> VCO_REFDIV_SHIFT; in berlin2_avpll_vco_recalc_rate()
165 refdiv = vco_refdiv[refdiv]; in berlin2_avpll_vco_recalc_rate()
168 do_div(freq, refdiv); in berlin2_avpll_vco_recalc_rate()
/linux-6.1.9/drivers/net/wireless/ath/ath10k/
Dhw.c488 .refdiv = 0,
496 .refdiv = 0,
504 .refdiv = 0,
512 .refdiv = 0,
520 .refdiv = 0,
528 .refdiv = 0,
536 .refdiv = 0,
544 .refdiv = 0,
821 reg_val |= (SM(hw_clk->refdiv, WLAN_PLL_CONTROL_REFDIV) | in ath10k_hw_qca6174_enable_pll_clock()
Dhw.h509 u32 refdiv; member
/linux-6.1.9/drivers/media/dvb-frontends/
Dcx24113.c85 u8 refdiv; member
281 static u8 cx24113_set_ref_div(struct cx24113_state *state, u8 refdiv) in cx24113_set_ref_div() argument
284 refdiv = 2; in cx24113_set_ref_div()
285 return state->refdiv = refdiv; in cx24113_set_ref_div()
396 cx24113_set_nfr(state, n, f, state->refdiv); in cx24113_set_frequency()
/linux-6.1.9/sound/soc/codecs/
Darizona.c2099 int refdiv; member
2156 int refdiv, div; in arizona_calc_fratio() local
2160 cfg->refdiv = 0; in arizona_calc_fratio()
2164 cfg->refdiv++; in arizona_calc_fratio()
2196 refdiv = cfg->refdiv; in arizona_calc_fratio()
2199 init_ratio, Fref, refdiv); in arizona_calc_fratio()
2207 cfg->refdiv = refdiv; in arizona_calc_fratio()
2211 Fref, refdiv, div, ratio); in arizona_calc_fratio()
2233 cfg->refdiv = refdiv; in arizona_calc_fratio()
2237 Fref, refdiv, div, ratio); in arizona_calc_fratio()
[all …]
Dmadera.c3509 int refdiv, div; in madera_calc_fratio() local
3513 cfg->refdiv = 0; in madera_calc_fratio()
3517 cfg->refdiv++; in madera_calc_fratio()
3558 refdiv = cfg->refdiv; in madera_calc_fratio()
3567 cfg->refdiv = refdiv; in madera_calc_fratio()
3583 cfg->refdiv = refdiv; in madera_calc_fratio()
3591 refdiv++; in madera_calc_fratio()
3639 fref = fref / (1 << cfg->refdiv); in madera_calc_fll()
3708 cfg->fratio, ratio, cfg->refdiv, 1 << cfg->refdiv); in madera_calc_fll()
3741 cfg->refdiv << MADERA_FLL1_REFCLK_DIV_SHIFT | in madera_write_fll()
[all …]
Dmadera.h152 int refdiv; member
/linux-6.1.9/drivers/clk/socfpga/
Dclk-pll-s10.c87 unsigned long refdiv; in clk_pll_recalc_rate() local
93 refdiv = (reg & SOCFPGA_PLL_REFDIV_MASK) >> SOCFPGA_PLL_REFDIV_SHIFT; in clk_pll_recalc_rate()
96 do_div(vco_freq, refdiv); in clk_pll_recalc_rate()
/linux-6.1.9/drivers/clk/
Dclk-axm5516.c52 unsigned long rate, fbdiv, refdiv, postdiv; in axxia_pllclk_recalc() local
58 refdiv = ((control >> 16) & 0x1f) + 1; in axxia_pllclk_recalc()
59 rate = (parent_rate / (refdiv * postdiv)) * fbdiv; in axxia_pllclk_recalc()
Dclk-bm1880.c477 u32 fbdiv, refdiv; in bm1880_pll_rate_calc() local
481 refdiv = regval & 0x1f; in bm1880_pll_rate_calc()
486 denominator = refdiv * postdiv1 * postdiv2; in bm1880_pll_rate_calc()
/linux-6.1.9/drivers/net/wireless/ath/ath9k/
Dhw.c833 u32 regval, pll2_divint, pll2_divfrac, refdiv; in ath9k_hw_init_pll() local
846 refdiv = 1; in ath9k_hw_init_pll()
850 refdiv = 3; in ath9k_hw_init_pll()
856 refdiv = 5; in ath9k_hw_init_pll()
862 refdiv = 1; in ath9k_hw_init_pll()
874 REG_WRITE(ah, AR_PHY_PLL_CONTROL, (refdiv << 27) | in ath9k_hw_init_pll()
/linux-6.1.9/drivers/gpu/drm/amd/amdgpu/
Damdgpu_mode.h364 uint8_t refdiv; member
Datombios_crtc.c340 if (amdgpu_crtc->ss.refdiv) { in amdgpu_atombios_crtc_adjust_pll()
342 amdgpu_crtc->pll_reference_div = amdgpu_crtc->ss.refdiv; in amdgpu_atombios_crtc_adjust_pll()
/linux-6.1.9/drivers/gpu/drm/radeon/
Dradeon_mode.h310 uint8_t refdiv; member
Datombios_crtc.c623 if (radeon_crtc->ss.refdiv) { in atombios_adjust_pll()
625 radeon_crtc->pll_reference_div = radeon_crtc->ss.refdiv; in atombios_adjust_pll()
Dradeon_atombios.c1402 ss->refdiv = ss_assign->ucRecommendedRef_Div; in radeon_atombios_get_ppll_ss_info()