Home
last modified time | relevance | path

Searched refs:tmp_rate (Results 1 – 17 of 17) sorted by relevance

/linux/drivers/clk/mxs/
H A Dclk-frac.c38 u64 tmp_rate; in clk_frac_recalc_rate() local
43 tmp_rate = (u64)parent_rate * div; in clk_frac_recalc_rate()
44 return tmp_rate >> frac->width; in clk_frac_recalc_rate()
53 u64 tmp, tmp_rate, result; in clk_frac_determine_rate() local
66 tmp_rate = (u64)parent_rate * div; in clk_frac_determine_rate()
67 result = tmp_rate >> frac->width; in clk_frac_determine_rate()
68 if ((result << frac->width) < tmp_rate) in clk_frac_determine_rate()
/linux/drivers/clk/sunxi/
H A Dclk-sun4i-tcon-ch1.c111 unsigned long tmp_rate; in tcon_ch1_calc_divider() local
113 tmp_rate = parent_rate / m / d; in tcon_ch1_calc_divider()
115 if (tmp_rate > rate) in tcon_ch1_calc_divider()
119 (rate - tmp_rate) < (rate - best_rate)) { in tcon_ch1_calc_divider()
120 best_rate = tmp_rate; in tcon_ch1_calc_divider()
143 unsigned long tmp_rate; in tcon_ch1_determine_rate() local
152 tmp_rate = tcon_ch1_calc_divider(req->rate, parent_rate, in tcon_ch1_determine_rate()
156 (req->rate - tmp_rate) < (req->rate - best_rate)) { in tcon_ch1_determine_rate()
157 best_rate = tmp_rate; in tcon_ch1_determine_rate()
/linux/drivers/clk/at91/
H A Dclk-programmable.c58 unsigned long tmp_rate = 0; in clk_programmable_determine_rate() local
70 tmp_rate = parent_rate / (shift + 1); in clk_programmable_determine_rate()
71 if (tmp_rate <= req->rate) in clk_programmable_determine_rate()
76 tmp_rate = parent_rate >> shift; in clk_programmable_determine_rate()
77 if (tmp_rate <= req->rate) in clk_programmable_determine_rate()
82 if (tmp_rate > req->rate) in clk_programmable_determine_rate()
86 (req->rate - tmp_rate) < (req->rate - best_rate)) { in clk_programmable_determine_rate()
87 best_rate = tmp_rate; in clk_programmable_determine_rate()
H A Dclk-generated.c113 unsigned long tmp_rate; in clk_generated_best_diff() local
117 tmp_rate = parent_rate; in clk_generated_best_diff()
119 tmp_rate = parent_rate / div; in clk_generated_best_diff()
121 if (tmp_rate < req->min_rate || tmp_rate > req->max_rate) in clk_generated_best_diff()
124 tmp_diff = abs(req->rate - tmp_rate); in clk_generated_best_diff()
127 *best_rate = tmp_rate; in clk_generated_best_diff()
H A Dclk-audio-pll.c281 long tmp_rate; in clk_audio_pll_pad_determine_rate() local
308 tmp_rate = best_parent_rate / (div * tmp_qd); in clk_audio_pll_pad_determine_rate()
309 tmp_diff = abs(req->rate - tmp_rate); in clk_audio_pll_pad_determine_rate()
313 best_rate = tmp_rate; in clk_audio_pll_pad_determine_rate()
333 long tmp_rate; in clk_audio_pll_pmc_determine_rate() local
347 tmp_rate = best_parent_rate / div; in clk_audio_pll_pmc_determine_rate()
348 tmp_diff = abs(req->rate - tmp_rate); in clk_audio_pll_pmc_determine_rate()
352 best_rate = tmp_rate; in clk_audio_pll_pmc_determine_rate()
H A Dclk-usb.c62 unsigned long tmp_rate; in at91sam9x5_clk_usb_determine_rate() local
83 tmp_rate = DIV_ROUND_CLOSEST(tmp_parent_rate, div); in at91sam9x5_clk_usb_determine_rate()
84 if (tmp_rate < req->rate) in at91sam9x5_clk_usb_determine_rate()
85 tmp_diff = req->rate - tmp_rate; in at91sam9x5_clk_usb_determine_rate()
87 tmp_diff = tmp_rate - req->rate; in at91sam9x5_clk_usb_determine_rate()
90 best_rate = tmp_rate; in at91sam9x5_clk_usb_determine_rate()
96 if (!best_diff || tmp_rate < req->rate) in at91sam9x5_clk_usb_determine_rate()
H A Dclk-peripheral.c261 unsigned long tmp_rate = parent_rate >> shift; in clk_sam9x5_peripheral_best_diff() local
262 unsigned long tmp_diff = abs(req->rate - tmp_rate); in clk_sam9x5_peripheral_best_diff()
265 *best_rate = tmp_rate; in clk_sam9x5_peripheral_best_diff()
278 unsigned long tmp_rate; in clk_sam9x5_peripheral_determine_rate() local
291 tmp_rate = parent_rate >> shift; in clk_sam9x5_peripheral_determine_rate()
293 if (periph->range.max && tmp_rate > periph->range.max) in clk_sam9x5_peripheral_determine_rate()
H A Dclk-master.c360 unsigned long tmp_rate, tmp_diff; in clk_sama7g5_master_best_diff() local
363 tmp_rate = parent_rate / 3; in clk_sama7g5_master_best_diff()
365 tmp_rate = parent_rate >> div; in clk_sama7g5_master_best_diff()
367 tmp_diff = abs(req->rate - tmp_rate); in clk_sama7g5_master_best_diff()
370 *best_rate = tmp_rate; in clk_sama7g5_master_best_diff()
H A Dclk-sam9x60-pll.c458 unsigned long tmp_rate, tmp_parent_rate, tmp_diff; in sam9x60_div_pll_compute_div() local
474 tmp_rate = DIV_ROUND_CLOSEST_ULL(tmp_parent_rate, divid); in sam9x60_div_pll_compute_div()
475 tmp_diff = abs(rate - tmp_rate); in sam9x60_div_pll_compute_div()
479 best_rate = tmp_rate; in sam9x60_div_pll_compute_div()
/linux/drivers/clk/sunxi-ng/
H A Dccu_nkm.c45 unsigned long tmp_rate, tmp_parent; in ccu_nkm_find_best_with_parent_adj() local
52 tmp_rate = tmp_parent * _n * _k / _m; in ccu_nkm_find_best_with_parent_adj()
54 if (ccu_is_better_rate(common, rate, tmp_rate, best_rate) || in ccu_nkm_find_best_with_parent_adj()
55 (tmp_parent == *parent && tmp_rate == best_rate)) { in ccu_nkm_find_best_with_parent_adj()
56 best_rate = tmp_rate; in ccu_nkm_find_best_with_parent_adj()
88 unsigned long tmp_rate; in ccu_nkm_find_best() local
90 tmp_rate = parent * _n * _k / _m; in ccu_nkm_find_best()
92 if (ccu_is_better_rate(common, rate, tmp_rate, best_rate)) { in ccu_nkm_find_best()
93 best_rate = tmp_rate; in ccu_nkm_find_best()
H A Dccu_mp.c31 unsigned long tmp_rate = parent / _p / _m; in ccu_mp_find_best() local
33 if (tmp_rate > rate) in ccu_mp_find_best()
36 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_mp_find_best()
37 best_rate = tmp_rate; in ccu_mp_find_best()
/linux/drivers/gpu/drm/sun4i/
H A Dsun4i_hdmi_tmds_clk.c41 unsigned long tmp_rate; in sun4i_tmds_calc_divider() local
43 tmp_rate = parent_rate / m / d; in sun4i_tmds_calc_divider()
45 if (tmp_rate > rate) in sun4i_tmds_calc_divider()
49 (rate - tmp_rate) < (rate - best_rate)) { in sun4i_tmds_calc_divider()
50 best_rate = tmp_rate; in sun4i_tmds_calc_divider()
H A Dsun8i_hdmi_phy_clk.c89 unsigned long tmp_rate = parent_rate / m; in sun8i_phy_clk_set_rate() local
91 if (tmp_rate > rate) in sun8i_phy_clk_set_rate()
95 (rate - tmp_rate) < (rate - best_rate)) { in sun8i_phy_clk_set_rate()
96 best_rate = tmp_rate; in sun8i_phy_clk_set_rate()
/linux/drivers/rtc/
H A Drtc-ac100.c146 unsigned long best_rate = 0, tmp_rate, tmp_prate; in ac100_clkout_round_rate() local
156 tmp_rate = divider_round_rate(hw, rate, &tmp_prate, NULL, in ac100_clkout_round_rate()
160 if (tmp_rate > rate) in ac100_clkout_round_rate()
162 if (rate - tmp_rate < best_rate - tmp_rate) in ac100_clkout_round_rate()
163 best_rate = tmp_rate; in ac100_clkout_round_rate()
/linux/drivers/clk/samsung/
H A Dclk-cpu.c237 unsigned long tmp_rate = min(ndata->old_rate, ndata->new_rate); in exynos_cpuclk_pre_rate_change() local
240 alt_div = DIV_ROUND_UP(alt_prate, tmp_rate) - 1; in exynos_cpuclk_pre_rate_change()
358 unsigned long tmp_rate = min(ndata->old_rate, ndata->new_rate); in exynos5433_cpuclk_pre_rate_change() local
361 alt_div = DIV_ROUND_UP(alt_prate, tmp_rate) - 1; in exynos5433_cpuclk_pre_rate_change()
510 unsigned long tmp_rate = min(ndata->old_rate, ndata->new_rate); in exynos850_cpuclk_pre_rate_change() local
512 ret = exynos850_alt_parent_set_max_rate(alt_parent, tmp_rate); in exynos850_cpuclk_pre_rate_change()
/linux/drivers/clk/sophgo/
H A Dclk-cv18xx-ip.c215 unsigned long tmp_rate, parent_rate; in mux_helper_determine_rate() local
224 tmp_rate = round(parent, &parent_rate, req->rate, i, data); in mux_helper_determine_rate()
226 if (tmp_rate == req->rate) { in mux_helper_determine_rate()
229 best_rate = tmp_rate; in mux_helper_determine_rate()
234 tmp_rate, best_rate)) { in mux_helper_determine_rate()
237 best_rate = tmp_rate; in mux_helper_determine_rate()
/linux/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/
H A Dhw.c3347 u8 i, j, tmp_rate; in _rtl8821ae_rate_to_bitmap_2ssvht() local
3351 tmp_rate = (le16_to_cpu(vht_rate) >> i) & 3; in _rtl8821ae_rate_to_bitmap_2ssvht()
3353 switch (tmp_rate) { in _rtl8821ae_rate_to_bitmap_2ssvht()