Home
last modified time | relevance | path

Searched refs:pre_div (Results 1 – 25 of 45) sorted by relevance

12

/linux/drivers/clk/sunxi/
A Dclk-sun9i-cpus.c75 u8 div, pre_div = 1; in sun9i_a80_cpus_clk_round() local
90 pre_div = div; in sun9i_a80_cpus_clk_round()
93 pre_div = DIV_ROUND_UP(div, 2); in sun9i_a80_cpus_clk_round()
96 pre_div = DIV_ROUND_UP(div, 3); in sun9i_a80_cpus_clk_round()
99 pre_div = DIV_ROUND_UP(div, 4); in sun9i_a80_cpus_clk_round()
107 *pre_divp = pre_div - 1; in sun9i_a80_cpus_clk_round()
110 return parent_rate / pre_div / div; in sun9i_a80_cpus_clk_round()
157 u8 div, pre_div, parent; in sun9i_a80_cpus_clk_set_rate() local
166 sun9i_a80_cpus_clk_round(rate, &div, &pre_div, parent, parent_rate); in sun9i_a80_cpus_clk_set_rate()
169 reg = SUN9I_CPUS_PLL4_DIV_SET(reg, pre_div); in sun9i_a80_cpus_clk_set_rate()
/linux/drivers/pwm/
A Dpwm-meson.c91 u8 pre_div; member
165 unsigned int duty, period, pre_div, cnt, duty_cnt; in meson_pwm_calc() local
183 if (pre_div > MISC_CLK_DIV_MASK) { in meson_pwm_calc()
195 pre_div, cnt); in meson_pwm_calc()
198 channel->pre_div = pre_div; in meson_pwm_calc()
202 channel->pre_div = pre_div; in meson_pwm_calc()
208 NSEC_PER_SEC * (pre_div + 1)); in meson_pwm_calc()
215 duty, pre_div, duty_cnt); in meson_pwm_calc()
217 channel->pre_div = pre_div; in meson_pwm_calc()
291 channel->pre_div = 0; in meson_pwm_apply()
[all …]
/linux/drivers/gpu/drm/sun4i/
A Dsun4i_hdmi_ddc_clk.c18 u8 pre_div; member
29 const u8 pre_div, in sun4i_ddc_calc_divider() argument
40 tmp_rate = (((parent_rate / pre_div) / 10) >> _n) / in sun4i_ddc_calc_divider()
67 return sun4i_ddc_calc_divider(rate, *prate, ddc->pre_div, in sun4i_ddc_round_rate()
82 return (((parent_rate / ddc->pre_div) / 10) >> n) / in sun4i_ddc_recalc_rate()
92 sun4i_ddc_calc_divider(rate, parent_rate, ddc->pre_div, in sun4i_ddc_set_rate()
134 ddc->pre_div = hdmi->variant->ddc_clk_pre_divider; in sun4i_ddc_create()
/linux/drivers/clk/bcm/
A Dclk-kona-setup.c72 div = &peri->pre_div; in clk_requires_trigger()
138 div = &peri->pre_div; in peri_clk_data_offsets_valid()
372 struct bcm_clk_div *pre_div; in kona_dividers_valid() local
381 pre_div = &peri->pre_div; in kona_dividers_valid()
382 if (divider_is_fixed(div) || divider_is_fixed(pre_div)) in kona_dividers_valid()
387 return div->u.s.frac_width + pre_div->u.s.frac_width <= limit; in kona_dividers_valid()
408 struct bcm_clk_div *pre_div; in peri_clk_data_valid() local
450 pre_div = &peri->pre_div; in peri_clk_data_valid()
455 if (divider_exists(pre_div)) in peri_clk_data_valid()
456 if (!div_valid(pre_div, "pre-divider", name)) in peri_clk_data_valid()
[all …]
A Dclk-kona.c694 struct bcm_clk_div *div, struct bcm_clk_div *pre_div, in clk_recalc_rate() argument
716 if (pre_div && divider_exists(pre_div)) { in clk_recalc_rate()
719 scaled_rate = scale_rate(pre_div, parent_rate); in clk_recalc_rate()
721 scaled_div = divider_read_scaled(ccu, pre_div); in clk_recalc_rate()
749 struct bcm_clk_div *pre_div, in round_rate() argument
774 if (divider_exists(pre_div)) { in round_rate()
778 scaled_rate = scale_rate(pre_div, parent_rate); in round_rate()
780 scaled_pre_div = divider_read_scaled(ccu, pre_div); in round_rate()
1018 return round_rate(bcm_clk->ccu, div, &bcm_clk->u.peri->pre_div, in kona_peri_clk_round_rate()
1161 (void)round_rate(bcm_clk->ccu, div, &data->pre_div, in kona_peri_clk_set_rate()
[all …]
/linux/drivers/clk/qcom/
A Dclk-rcg.c120 static u32 pre_div_to_ns(struct pre_div *p, u8 pre_div, u32 ns) in pre_div_to_ns() argument
128 ns |= pre_div << p->pre_div_shift; in pre_div_to_ns()
203 struct pre_div *p; in configure_bank()
328 if (pre_div) in calc_rate()
329 rate /= pre_div + 1; in calc_rate()
349 pre_div = ns_to_pre_div(&rcg->p, ns); in clk_rcg_recalc_rate()
370 u32 m, n, pre_div, ns, md, mode, reg; in clk_dyn_rcg_recalc_rate() local
380 m = n = pre_div = mode = 0; in clk_dyn_rcg_recalc_rate()
418 rate = rate * f->pre_div; in _freq_tbl_determine_rate()
642 f.pre_div = 1; in clk_rcg_pixel_set_rate()
[all …]
A Dclk-rcg.h15 u8 pre_div; member
47 struct pre_div { struct
80 struct pre_div p;
118 struct pre_div p[2];
A Dclk-rcg2.c226 if (f->pre_div) { in _freq_tbl_determine_rate()
517 f.pre_div = hid_div; in clk_edp_pixel_set_rate()
519 f.pre_div &= mask; in clk_edp_pixel_set_rate()
625 f.pre_div = div; in clk_byte_set_rate()
684 f.pre_div = div; in clk_byte2_set_rate()
780 f.pre_div = hid_div; in clk_pixel_set_rate()
782 f.pre_div &= mask; in clk_pixel_set_rate()
1064 f->pre_div = 1; in clk_rcg2_dfs_populate_freq()
1160 pre_div = 1; in clk_rcg2_dfs_recalc_rate()
1260 f.pre_div = hid_div; in clk_rcg2_dp_set_rate()
[all …]
A Dgcc-ipq4019.c1287 f->pre_div << pll->cdiv.shift); in clk_cpu_div_set_rate()
1308 u32 cdiv, pre_div; in clk_cpu_div_recalc_rate() local
1320 pre_div = (cdiv + 1) * 2; in clk_cpu_div_recalc_rate()
1322 pre_div = cdiv + 12; in clk_cpu_div_recalc_rate()
1325 do_div(rate, pre_div); in clk_cpu_div_recalc_rate()
1384 u32 cdiv, pre_div = 1; in clk_regmap_clk_div_recalc_rate() local
1389 pre_div = pll->fixed_div; in clk_regmap_clk_div_recalc_rate()
1396 pre_div = clkt->div; in clk_regmap_clk_div_recalc_rate()
1401 do_div(rate, pre_div); in clk_regmap_clk_div_recalc_rate()
/linux/drivers/phy/mediatek/
A Dphy-mtk-hdmi-mt8173.c160 unsigned int pre_div; in mtk_hdmi_pll_set_rate() local
170 pre_div = 0; in mtk_hdmi_pll_set_rate()
173 pre_div = 1; in mtk_hdmi_pll_set_rate()
176 pre_div = 1; in mtk_hdmi_pll_set_rate()
181 (pre_div << PREDIV_SHIFT), RG_HDMITX_PLL_PREDIV); in mtk_hdmi_pll_set_rate()
/linux/drivers/clk/
A Dclk-sparx5.c53 u8 pre_div; member
65 int divt = sel_rates[conf->rot_sel] * (1 + conf->pre_div); in s5_calc_freq()
91 conf->pre_div = i; in s5_search_fractional()
183 val |= FIELD_PREP(PLL_PRE_DIV, conf.pre_div); in s5_pll_set_rate()
203 conf.pre_div = FIELD_GET(PLL_PRE_DIV, val); in s5_pll_recalc_rate()
/linux/sound/soc/codecs/
A Drt1016.c310 int pre_div, bclk_ms, frame_size; in rt1016_hw_params() local
314 pre_div = rl6231_get_clk_info(rt1016->sysclk, rt1016->lrck); in rt1016_hw_params()
315 if (pre_div < 0) { in rt1016_hw_params()
335 rt1016->lrck, pre_div, dai->id); in rt1016_hw_params()
358 ((pre_div + 3) << RT1016_FS_PD_SFT) | in rt1016_hw_params()
359 (pre_div << RT1016_OSR_PD_SFT)); in rt1016_hw_params()
A Drt1019.c162 int pre_div, bclk_ms, frame_size; in rt1019_hw_params() local
168 pre_div = rl6231_get_clk_info(rt1019->sysclk, rt1019->lrck); in rt1019_hw_params()
169 if (pre_div < 0) { in rt1019_hw_params()
186 bclk_ms, pre_div, dai->id); in rt1019_hw_params()
188 switch (pre_div) { in rt1019_hw_params()
A Drt1308.c459 int pre_div, bclk_ms, frame_size; in rt1308_hw_params() local
462 pre_div = rt1308_get_clk_info(rt1308->sysclk, rt1308->lrck); in rt1308_hw_params()
463 if (pre_div < 0) { in rt1308_hw_params()
480 bclk_ms, pre_div, dai->id); in rt1308_hw_params()
483 rt1308->lrck, pre_div, dai->id); in rt1308_hw_params()
505 val_clk = pre_div << RT1308_DIV_FS_SYS_SFT; in rt1308_hw_params()
A Drt1015.c692 int pre_div, frame_size, lrck; in rt1015_hw_params() local
696 pre_div = rl6231_get_clk_info(rt1015->sysclk, lrck); in rt1015_hw_params()
697 if (pre_div < 0) { in rt1015_hw_params()
709 dev_dbg(component->dev, "pre_div is %d for iis %d\n", pre_div, dai->id); in rt1015_hw_params()
712 lrck, pre_div, dai->id); in rt1015_hw_params()
733 RT1015_FS_PD_MASK, pre_div << RT1015_FS_PD_SFT); in rt1015_hw_params()
A Drt1305.c631 int pre_div, bclk_ms, frame_size; in rt1305_hw_params() local
634 pre_div = rt1305_get_clk_info(rt1305->sysclk, rt1305->lrck); in rt1305_hw_params()
635 if (pre_div < 0) { in rt1305_hw_params()
641 pre_div = 0; in rt1305_hw_params()
654 bclk_ms, pre_div, dai->id); in rt1305_hw_params()
657 rt1305->lrck, pre_div, dai->id); in rt1305_hw_params()
679 val_clk = pre_div << RT1305_DIV_FS_SYS_SFT; in rt1305_hw_params()
A Dwm8510.c266 unsigned int pre_div:4; /* prescale - 1 */ member
285 pll_div.pre_div = 1; in pll_factors()
288 pll_div.pre_div = 0; in pll_factors()
332 snd_soc_component_write(component, WM8510_PLLN, (pll_div.pre_div << 4) | pll_div.n); in wm8510_set_dai_pll()
A Drt5514.c756 int pre_div, bclk_ms, frame_size; in rt5514_hw_params() local
760 pre_div = rl6231_get_clk_info(rt5514->sysclk, rt5514->lrck); in rt5514_hw_params()
761 if (pre_div < 0) { in rt5514_hw_params()
778 bclk_ms, pre_div, dai->id); in rt5514_hw_params()
800 (pre_div + 1) << RT5514_CLK_AD_ANA1_SEL_SFT); in rt5514_hw_params()
803 pre_div << RT5514_CLK_SYS_DIV_OUT_SFT | in rt5514_hw_params()
804 pre_div << RT5514_SEL_ADC_OSR_SFT); in rt5514_hw_params()
A Dwm8974.c263 unsigned int pre_div:1; member
284 pll_div->pre_div = 1; in pll_factors()
287 pll_div->pre_div = 0; in pll_factors()
332 snd_soc_component_write(component, WM8974_PLLN, (pll_div.pre_div << 4) | pll_div.n); in wm8974_set_dai_pll()
A Drt5660.c841 int pre_div, bclk_ms, frame_size; in rt5660_hw_params() local
844 pre_div = rl6231_get_clk_info(rt5660->sysclk, rt5660->lrck[dai->id]); in rt5660_hw_params()
845 if (pre_div < 0) { in rt5660_hw_params()
867 bclk_ms, pre_div, dai->id); in rt5660_hw_params()
889 pre_div << RT5660_I2S_PD1_SFT; in rt5660_hw_params()
/linux/drivers/mmc/host/
A Dsdhci-of-esdhc.c644 unsigned int pre_div = 1, div = 1; in esdhc_of_set_clock() local
657 pre_div = 2; in esdhc_of_set_clock()
670 while (host->max_clk / pre_div / 16 > clock_fixup && pre_div < 256) in esdhc_of_set_clock()
671 pre_div *= 2; in esdhc_of_set_clock()
676 esdhc->div_ratio = pre_div * div; in esdhc_of_set_clock()
684 pre_div = 4; in esdhc_of_set_clock()
687 pre_div = 4; in esdhc_of_set_clock()
690 pre_div = 4; in esdhc_of_set_clock()
696 esdhc->div_ratio = pre_div * div; in esdhc_of_set_clock()
705 pre_div >>= 1; in esdhc_of_set_clock()
[all …]
A Dsdhci-esdhc-imx.c893 int pre_div = 1; in esdhc_pltfm_set_clock() local
921 pre_div = 2; in esdhc_pltfm_set_clock()
937 while (host_clock / (16 * pre_div * ddr_pre_div) > clock && in esdhc_pltfm_set_clock()
938 pre_div < 256) in esdhc_pltfm_set_clock()
939 pre_div *= 2; in esdhc_pltfm_set_clock()
941 while (host_clock / (div * pre_div * ddr_pre_div) > clock && div < 16) in esdhc_pltfm_set_clock()
944 host->mmc->actual_clock = host_clock / (div * pre_div * ddr_pre_div); in esdhc_pltfm_set_clock()
948 pre_div >>= 1; in esdhc_pltfm_set_clock()
954 | (pre_div << ESDHC_PREDIV_SHIFT)); in esdhc_pltfm_set_clock()
/linux/drivers/rtc/
A Drtc-ac100.c226 int div = 0, pre_div = 0; in ac100_clkout_set_rate() local
229 div = divider_get_val(rate * ac100_clkout_prediv[pre_div].div, in ac100_clkout_set_rate()
235 ac100_clkout_prediv[++pre_div].div); in ac100_clkout_set_rate()
240 pre_div = ac100_clkout_prediv[pre_div].val; in ac100_clkout_set_rate()
246 (pre_div - 1) << AC100_CLKOUT_PRE_DIV_SHIFT); in ac100_clkout_set_rate()
/linux/drivers/media/i2c/
A Dccs-pll.c384 u32 pre_mul, pre_div; in ccs_pll_calculate_vt_tree() local
386 pre_div = gcd(pll->pixel_rate_csi, in ccs_pll_calculate_vt_tree()
388 pre_mul = pll->pixel_rate_csi / pre_div; in ccs_pll_calculate_vt_tree()
389 pre_div = pll->ext_clk_freq_hz * pll->vt_lanes / pre_div; in ccs_pll_calculate_vt_tree()
412 div = gcd(pre_mul * pll_fr->pre_pll_clk_div, pre_div); in ccs_pll_calculate_vt_tree()
414 div = pre_div / div; in ccs_pll_calculate_vt_tree()
/linux/drivers/iio/adc/
A Dimx7d_adc.c123 u32 pre_div; member
128 .pre_div = (_pre_div), \
205 info->pre_div_num = adc_analogure_clk.pre_div; in imx7d_adc_sample_rate_set()

Completed in 66 milliseconds

12