Home
last modified time | relevance | path

Searched refs:vco_freq (Results 1 – 25 of 32) sorted by relevance

12

/linux-6.6.21/drivers/clk/
Dclk-plldig.c60 unsigned int vco_freq; member
123 return DIV_ROUND_UP(data->vco_freq, rfdphi1); in plldig_recalc_rate()
126 static unsigned long plldig_calc_target_div(unsigned long vco_freq, in plldig_calc_target_div() argument
131 div = DIV_ROUND_CLOSEST(vco_freq, target_rate); in plldig_calc_target_div()
144 div = plldig_calc_target_div(data->vco_freq, req->rate); in plldig_determine_rate()
145 req->rate = DIV_ROUND_UP(data->vco_freq, div); in plldig_determine_rate()
158 rfdphi1 = plldig_calc_target_div(data->vco_freq, rate); in plldig_set_rate()
198 if (data->vco_freq) { in plldig_init()
199 mfd = data->vco_freq / parent_rate; in plldig_init()
200 lltmp = data->vco_freq % parent_rate; in plldig_init()
[all …]
Dclk-highbank.c97 unsigned long divf, divq, vco_freq, reg; in clk_pll_recalc_rate() local
105 vco_freq = parent_rate * (divf + 1); in clk_pll_recalc_rate()
107 return vco_freq / (1 << divq); in clk_pll_recalc_rate()
114 unsigned long vco_freq; in clk_pll_calc() local
126 vco_freq = rate * (1 << divq); in clk_pll_calc()
127 divf = (vco_freq + (ref_freq / 2)) / ref_freq; in clk_pll_calc()
/linux-6.6.21/drivers/gpu/drm/vc4/
Dvc4_hdmi_phy.c181 unsigned long long vco_freq = clock; in phy_get_vco_freq() local
185 while (vco_freq < 3000000000ULL) { in phy_get_vco_freq()
187 vco_freq = clock * _vco_div * 10; in phy_get_vco_freq()
190 if (vco_freq > 4500000000ULL) in phy_get_vco_freq()
196 return vco_freq; in phy_get_vco_freq()
199 static u8 phy_get_cp_current(unsigned long vco_freq) in phy_get_cp_current() argument
201 if (vco_freq < 3700000000ULL) in phy_get_cp_current()
207 static u32 phy_get_rm_offset(unsigned long long vco_freq) in phy_get_rm_offset() argument
213 offset = vco_freq * 2; in phy_get_rm_offset()
221 static u8 phy_get_vco_gain(unsigned long long vco_freq) in phy_get_vco_gain() argument
[all …]
/linux-6.6.21/drivers/clk/socfpga/
Dclk-pll-s10.c66 unsigned long long vco_freq; in agilex_clk_pll_recalc_rate() local
72 vco_freq = (unsigned long long)parent_rate / arefdiv; in agilex_clk_pll_recalc_rate()
78 vco_freq = (unsigned long long)vco_freq * mdiv; in agilex_clk_pll_recalc_rate()
79 return (unsigned long)vco_freq; in agilex_clk_pll_recalc_rate()
89 unsigned long long vco_freq; in clk_pll_recalc_rate() local
95 vco_freq = parent_rate; in clk_pll_recalc_rate()
96 do_div(vco_freq, refdiv); in clk_pll_recalc_rate()
101 vco_freq = (unsigned long long)vco_freq * (mdiv + 6); in clk_pll_recalc_rate()
103 return (unsigned long)vco_freq; in clk_pll_recalc_rate()
Dclk-pll.c43 unsigned long long vco_freq; in clk_pll_recalc_rate() local
53 vco_freq = (unsigned long long)parent_rate * (divf + 1); in clk_pll_recalc_rate()
54 do_div(vco_freq, (1 + divq)); in clk_pll_recalc_rate()
55 return (unsigned long)vco_freq; in clk_pll_recalc_rate()
Dclk-pll-a10.c39 unsigned long long vco_freq; in clk_pll_recalc_rate() local
45 vco_freq = (unsigned long long)parent_rate * (divf + 1); in clk_pll_recalc_rate()
46 do_div(vco_freq, (1 + divq)); in clk_pll_recalc_rate()
47 return (unsigned long)vco_freq; in clk_pll_recalc_rate()
/linux-6.6.21/drivers/gpu/drm/radeon/
Dradeon_uvd.c907 static unsigned radeon_uvd_calc_upll_post_div(unsigned vco_freq, in radeon_uvd_calc_upll_post_div() argument
912 unsigned post_div = vco_freq / target_freq; in radeon_uvd_calc_upll_post_div()
919 if ((vco_freq / post_div) > target_freq) in radeon_uvd_calc_upll_post_div()
959 unsigned vco_freq, ref_freq = rdev->clock.spll.reference_freq; in radeon_uvd_calc_upll_dividers() local
966 for (vco_freq = vco_min; vco_freq <= vco_max; vco_freq += 100) { in radeon_uvd_calc_upll_dividers()
968 uint64_t fb_div = (uint64_t)vco_freq * fb_factor; in radeon_uvd_calc_upll_dividers()
980 vclk_div = radeon_uvd_calc_upll_post_div(vco_freq, vclk, in radeon_uvd_calc_upll_dividers()
986 dclk_div = radeon_uvd_calc_upll_post_div(vco_freq, dclk, in radeon_uvd_calc_upll_dividers()
992 score = vclk - (vco_freq / vclk_div) + dclk - (vco_freq / dclk_div); in radeon_uvd_calc_upll_dividers()
Drv6xx_dpm.c533 static inline u32 rv6xx_calculate_spread_spectrum_clk_v(u32 vco_freq, u32 ref_freq, in rv6xx_calculate_spread_spectrum_clk_v() argument
537 u32 fb_divider = vco_freq / ref_freq; in rv6xx_calculate_spread_spectrum_clk_v()
540 (5375 * ((vco_freq * 10) / (4096 >> fb_divider_scale)))); in rv6xx_calculate_spread_spectrum_clk_v()
555 u32 vco_freq, clk_v, clk_s; in rv6xx_program_engine_spread_spectrum() local
561 vco_freq = rv6xx_calculate_vco_frequency(ref_clk, &dividers, in rv6xx_program_engine_spread_spectrum()
565 ASIC_INTERNAL_ENGINE_SS, vco_freq)) { in rv6xx_program_engine_spread_spectrum()
566 clk_v = rv6xx_calculate_spread_spectrum_clk_v(vco_freq, in rv6xx_program_engine_spread_spectrum()
634 u32 *vco_freq) in rv6xx_find_memory_clock_with_highest_vco() argument
645 if (vco_freq_temp > *vco_freq) { in rv6xx_find_memory_clock_with_highest_vco()
647 *vco_freq = vco_freq_temp; in rv6xx_find_memory_clock_with_highest_vco()
[all …]
Drv740_dpm.c159 u32 vco_freq = engine_clock * dividers.post_div; in rv740_populate_sclk_value() local
162 ASIC_INTERNAL_ENGINE_SS, vco_freq)) { in rv740_populate_sclk_value()
246 u32 vco_freq = memory_clock * dividers.post_div; in rv740_populate_mclk_value() local
249 ASIC_INTERNAL_MEMORY_SS, vco_freq)) { in rv740_populate_mclk_value()
Drv730_dpm.c90 u32 vco_freq = engine_clock * post_divider; in rv730_populate_sclk_value() local
93 ASIC_INTERNAL_ENGINE_SS, vco_freq)) { in rv730_populate_sclk_value()
165 u32 vco_freq = memory_clock * post_divider; in rv730_populate_mclk_value() local
168 ASIC_INTERNAL_MEMORY_SS, vco_freq)) { in rv730_populate_mclk_value()
Dradeon_atombios.c1115 rdev->clock.vco_freq = in radeon_atombios_get_dentist_vco_freq()
1272 rdev->clock.vco_freq = in radeon_atom_get_clock_info()
1275 rdev->clock.vco_freq = rdev->clock.current_dispclk; in radeon_atom_get_clock_info()
1279 rdev->clock.vco_freq = rdev->clock.current_dispclk; in radeon_atom_get_clock_info()
1281 if (rdev->clock.vco_freq == 0) in radeon_atom_get_clock_info()
1282 rdev->clock.vco_freq = 360000; /* 3.6 GHz */ in radeon_atom_get_clock_info()
Dradeon_audio.c692 radeon_audio_set_dto(encoder, rdev->clock.vco_freq * 10); in radeon_audio_dp_mode_set()
Dni_dpm.c2042 u32 vco_freq = engine_clock * dividers.post_div; in ni_calculate_sclk_params() local
2045 ASIC_INTERNAL_ENGINE_SS, vco_freq)) { in ni_calculate_sclk_params()
2238 u32 vco_freq = memory_clock * dividers.post_div; in ni_populate_mclk_value() local
2241 ASIC_INTERNAL_MEMORY_SS, vco_freq)) { in ni_populate_mclk_value()
Dcypress_dpm.c554 u32 vco_freq = memory_clock * dividers.post_div; in cypress_populate_mclk_value() local
557 ASIC_INTERNAL_MEMORY_SS, vco_freq)) { in cypress_populate_mclk_value()
Drv770_dpm.c541 u32 vco_freq = engine_clock * post_divider; in rv770_populate_sclk_value() local
544 ASIC_INTERNAL_ENGINE_SS, vco_freq)) { in rv770_populate_sclk_value()
/linux-6.6.21/drivers/gpu/drm/msm/hdmi/
Dhdmi_phy_8996.c74 u64 vco_freq; member
171 u64 vco_freq[60]; in pll_get_post_div() local
187 vco_freq[vco_freq_index++] = vco; in pll_get_post_div()
192 u64 vco_tmp = vco_freq[i]; in pll_get_post_div()
207 pd->vco_freq = vco_optimal; in pll_get_post_div()
248 dec_start = pd.vco_freq; in pll_calculate()
252 frac_start = pd.vco_freq * (1 << 20); in pll_calculate()
265 fdata = pd.vco_freq; in pll_calculate()
270 DBG("VCO freq: %llu", pd.vco_freq); in pll_calculate()
/linux-6.6.21/drivers/clk/xilinx/
Dclk-xlnx-clock-wizard.c230 unsigned long vco_freq, freq, diff; in clk_wzrd_get_divisors() local
235 vco_freq = DIV_ROUND_CLOSEST((parent_rate * m), d); in clk_wzrd_get_divisors()
236 if (vco_freq >= WZRD_VCO_MIN && vco_freq <= WZRD_VCO_MAX) { in clk_wzrd_get_divisors()
238 freq = DIV_ROUND_CLOSEST_ULL(vco_freq, o); in clk_wzrd_get_divisors()
258 unsigned long vco_freq, rate_div, clockout0_div; in clk_wzrd_dynamic_all_nolock() local
266 vco_freq = DIV_ROUND_CLOSEST(parent_rate * divider->m, divider->d); in clk_wzrd_dynamic_all_nolock()
267 rate_div = DIV_ROUND_CLOSEST_ULL((vco_freq * WZRD_FRAC_POINTS), rate); in clk_wzrd_dynamic_all_nolock()
271 pre = DIV_ROUND_CLOSEST_ULL(vco_freq * WZRD_FRAC_POINTS, rate); in clk_wzrd_dynamic_all_nolock()
/linux-6.6.21/drivers/gpu/drm/amd/amdgpu/
Dsi.c1671 static unsigned si_uvd_calc_upll_post_div(unsigned vco_freq, in si_uvd_calc_upll_post_div() argument
1676 unsigned post_div = vco_freq / target_freq; in si_uvd_calc_upll_post_div()
1683 if ((vco_freq / post_div) > target_freq) in si_uvd_calc_upll_post_div()
1723 unsigned vco_freq, ref_freq = adev->clock.spll.reference_freq; in si_calc_upll_dividers() local
1730 for (vco_freq = vco_min; vco_freq <= vco_max; vco_freq += 100) { in si_calc_upll_dividers()
1731 uint64_t fb_div = (uint64_t)vco_freq * fb_factor; in si_calc_upll_dividers()
1743 vclk_div = si_uvd_calc_upll_post_div(vco_freq, vclk, in si_calc_upll_dividers()
1749 dclk_div = si_uvd_calc_upll_post_div(vco_freq, dclk, in si_calc_upll_dividers()
1755 score = vclk - (vco_freq / vclk_div) + dclk - (vco_freq / dclk_div); in si_calc_upll_dividers()
/linux-6.6.21/drivers/media/dvb-frontends/
Dstv6110.c252 u32 divider, ref, p, presc, i, result_freq, vco_freq; in stv6110_set_frequency() local
329 vco_freq = divider * ((priv->mclk / 1000) / ((1 << (r_div_opt + 1)))); in stv6110_set_frequency()
331 ret, result_freq, vco_freq); in stv6110_set_frequency()
/linux-6.6.21/drivers/gpu/drm/amd/display/dc/inc/
Dclock_source.h110 uint32_t vco_freq; member
/linux-6.6.21/drivers/iio/frequency/
Dad9523.c275 unsigned long vco_freq; member
863 st->vco_freq = div_u64((unsigned long long)pdata->vcxo_freq * in ad9523_setup()
886 st->vco_freq / pdata->pll2_vco_div_m1; in ad9523_setup()
890 st->vco_freq / pdata->pll2_vco_div_m2; in ad9523_setup()
/linux-6.6.21/drivers/gpu/drm/i915/display/
Dintel_cx0_phy.c1910 u64 vco_freq; in intel_c20_compute_hdmi_tmds_pll() local
1924 vco_freq = (datarate << vco_freq_shift) >> 8; in intel_c20_compute_hdmi_tmds_pll()
1925 multiplier = div64_u64((vco_freq << 28), (REFCLK_38_4_MHZ >> 4)); in intel_c20_compute_hdmi_tmds_pll()
1931 mpll_div_multiplier = min_t(u8, div64_u64((vco_freq * 16 + (datarate >> 1)), in intel_c20_compute_hdmi_tmds_pll()
1934 if (vco_freq <= DATARATE_3000000000) in intel_c20_compute_hdmi_tmds_pll()
1936 else if (vco_freq <= DATARATE_3500000000) in intel_c20_compute_hdmi_tmds_pll()
1938 else if (vco_freq <= DATARATE_4000000000) in intel_c20_compute_hdmi_tmds_pll()
/linux-6.6.21/drivers/media/tuners/
Dr820t.c541 u32 vco_freq; in r820t_set_pll() local
632 vco_freq = freq * mix_div; in r820t_set_pll()
633 nint = vco_freq / (2 * pll_ref); in r820t_set_pll()
634 vco_fra = vco_freq - 2 * pll_ref * nint; in r820t_set_pll()
/linux-6.6.21/drivers/net/wireless/broadcom/b43/
Dphy_lp.c2484 u32 freqref, vco_freq, val1, val2, val3, timeout, timeoutref, count; in lpphy_b2063_tune() local
2516 vco_freq = chandata->freq << 1; in lpphy_b2063_tune()
2518 vco_freq = chandata->freq << 2; in lpphy_b2063_tune()
2523 val3 = lpphy_qdiv_roundup(vco_freq, 3, 16); in lpphy_b2063_tune()
/linux-6.6.21/drivers/gpu/drm/amd/display/dc/dce/
Ddce_clock_source.c240 pll_settings->vco_freq = in calc_fb_divider_checking_tolerance()

12