Home
last modified time | relevance | path

Searched refs:rate (Results 1 – 25 of 2392) sorted by relevance

12345678910>>...96

/linux-6.6.21/drivers/mmc/host/ !
Dsdhci-of-aspeed-test.c8 int rate = 52000000; in aspeed_sdhci_phase_ddr52() local
11 aspeed_sdhci_phase_to_tap(NULL, rate, 0)); in aspeed_sdhci_phase_ddr52()
13 aspeed_sdhci_phase_to_tap(NULL, rate, 1)); in aspeed_sdhci_phase_ddr52()
15 aspeed_sdhci_phase_to_tap(NULL, rate, 2)); in aspeed_sdhci_phase_ddr52()
17 aspeed_sdhci_phase_to_tap(NULL, rate, 3)); in aspeed_sdhci_phase_ddr52()
19 aspeed_sdhci_phase_to_tap(NULL, rate, 4)); in aspeed_sdhci_phase_ddr52()
21 aspeed_sdhci_phase_to_tap(NULL, rate, 5)); in aspeed_sdhci_phase_ddr52()
23 aspeed_sdhci_phase_to_tap(NULL, rate, 23)); in aspeed_sdhci_phase_ddr52()
25 aspeed_sdhci_phase_to_tap(NULL, rate, 24)); in aspeed_sdhci_phase_ddr52()
27 aspeed_sdhci_phase_to_tap(NULL, rate, 25)); in aspeed_sdhci_phase_ddr52()
[all …]
/linux-6.6.21/drivers/clk/rockchip/ !
Dclk-pll.c51 struct rockchip_clk_pll *pll, unsigned long rate) in rockchip_get_pll_settings() argument
57 if (rate == rate_table[i].rate) in rockchip_get_pll_settings()
73 if (drate >= rate_table[i].rate) in rockchip_pll_round_rate()
74 return rate_table[i].rate; in rockchip_pll_round_rate()
78 return rate_table[i - 1].rate; in rockchip_pll_round_rate()
140 struct rockchip_pll_rate_table *rate) in rockchip_rk3036_pll_get_params() argument
145 rate->fbdiv = ((pllcon >> RK3036_PLLCON0_FBDIV_SHIFT) in rockchip_rk3036_pll_get_params()
147 rate->postdiv1 = ((pllcon >> RK3036_PLLCON0_POSTDIV1_SHIFT) in rockchip_rk3036_pll_get_params()
151 rate->refdiv = ((pllcon >> RK3036_PLLCON1_REFDIV_SHIFT) in rockchip_rk3036_pll_get_params()
153 rate->postdiv2 = ((pllcon >> RK3036_PLLCON1_POSTDIV2_SHIFT) in rockchip_rk3036_pll_get_params()
[all …]
/linux-6.6.21/drivers/clk/actions/ !
Dowl-composite.c60 long rate; in owl_comp_div_determine_rate() local
62 rate = owl_divider_helper_round_rate(&comp->common, &comp->rate.div_hw, in owl_comp_div_determine_rate()
63 req->rate, &req->best_parent_rate); in owl_comp_div_determine_rate()
64 if (rate < 0) in owl_comp_div_determine_rate()
65 return rate; in owl_comp_div_determine_rate()
67 req->rate = rate; in owl_comp_div_determine_rate()
76 return owl_divider_helper_recalc_rate(&comp->common, &comp->rate.div_hw, in owl_comp_div_recalc_rate()
80 static int owl_comp_div_set_rate(struct clk_hw *hw, unsigned long rate, in owl_comp_div_set_rate() argument
85 return owl_divider_helper_set_rate(&comp->common, &comp->rate.div_hw, in owl_comp_div_set_rate()
86 rate, parent_rate); in owl_comp_div_set_rate()
[all …]
Dowl-factor.c44 unsigned long rate, unsigned long parent_rate) in _get_table_val() argument
54 if ((unsigned long)calc_rate <= rate) { in _get_table_val()
67 struct clk_hw *hw, unsigned long rate, in owl_clk_val_best() argument
75 if (!rate) in owl_clk_val_best()
76 rate = 1; in owl_clk_val_best()
80 bestval = _get_table_val(clkt, rate, parent_rate); in owl_clk_val_best()
85 try_parent_rate = rate * clkt->div / clkt->mul; in owl_clk_val_best()
103 if (cur_rate <= rate && cur_rate > best) { in owl_clk_val_best()
121 unsigned long rate, in owl_factor_helper_round_rate() argument
127 val = owl_clk_val_best(factor_hw, &common->hw, rate, parent_rate); in owl_factor_helper_round_rate()
[all …]
/linux-6.6.21/drivers/clk/sunxi-ng/ !
Dccu_nm.c22 u64 rate = parent; in ccu_nm_calc_rate() local
24 rate *= n; in ccu_nm_calc_rate()
25 do_div(rate, m); in ccu_nm_calc_rate()
27 return rate; in ccu_nm_calc_rate()
31 unsigned long rate, struct _ccu_nm *nm) in ccu_nm_find_best() argument
42 if (ccu_is_better_rate(common, rate, tmp_rate, best_rate)) { in ccu_nm_find_best()
81 unsigned long rate; in ccu_nm_recalc_rate() local
86 rate = ccu_frac_helper_read_rate(&nm->common, &nm->frac); in ccu_nm_recalc_rate()
89 rate /= nm->fixed_post_div; in ccu_nm_recalc_rate()
91 return rate; in ccu_nm_recalc_rate()
[all …]
Dccu_mp.c13 static unsigned long ccu_mp_find_best(unsigned long parent, unsigned long rate, in ccu_mp_find_best() argument
25 if (tmp_rate > rate) in ccu_mp_find_best()
28 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_mp_find_best()
44 unsigned long rate, in ccu_mp_find_best_with_parent_adj() argument
61 maxdiv = min(ULONG_MAX / rate, maxdiv); in ccu_mp_find_best_with_parent_adj()
70 if (rate * div == parent_rate_saved) { in ccu_mp_find_best_with_parent_adj()
78 return rate; in ccu_mp_find_best_with_parent_adj()
81 parent_rate = clk_hw_round_rate(hw, rate * div); in ccu_mp_find_best_with_parent_adj()
84 if (now <= rate && now > best_rate) { in ccu_mp_find_best_with_parent_adj()
88 if (now == rate) in ccu_mp_find_best_with_parent_adj()
[all …]
Dccu_nkmp.c24 u64 rate = parent; in ccu_nkmp_calc_rate() local
26 rate *= n * k; in ccu_nkmp_calc_rate()
27 do_div(rate, m * p); in ccu_nkmp_calc_rate()
29 return rate; in ccu_nkmp_calc_rate()
32 static unsigned long ccu_nkmp_find_best(unsigned long parent, unsigned long rate, in ccu_nkmp_find_best() argument
49 if (tmp_rate > rate) in ccu_nkmp_find_best()
52 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_nkmp_find_best()
97 unsigned long n, m, k, p, rate; in ccu_nkmp_recalc_rate() local
123 rate = ccu_nkmp_calc_rate(parent_rate, n, k, m, 1 << p); in ccu_nkmp_recalc_rate()
125 rate /= nkmp->fixed_post_div; in ccu_nkmp_recalc_rate()
[all …]
/linux-6.6.21/drivers/staging/rtl8723bs/include/ !
Dhal_com.h49 #define HDATA_RATE(rate)\ argument
50 (rate == DESC_RATE1M) ? "CCK_1M" : \
51 (rate == DESC_RATE2M) ? "CCK_2M" : \
52 (rate == DESC_RATE5_5M) ? "CCK5_5M" : \
53 (rate == DESC_RATE11M) ? "CCK_11M" : \
54 (rate == DESC_RATE6M) ? "OFDM_6M" : \
55 (rate == DESC_RATE9M) ? "OFDM_9M" : \
56 (rate == DESC_RATE12M) ? "OFDM_12M" : \
57 (rate == DESC_RATE18M) ? "OFDM_18M" : \
58 (rate == DESC_RATE24M) ? "OFDM_24M" : \
[all …]
/linux-6.6.21/drivers/clk/ !
Dclk_test.c19 unsigned long rate; member
28 return ctx->rate; in clk_dummy_recalc_rate()
46 req->rate = req->max_rate; in clk_dummy_maximize_rate()
59 req->rate = req->min_rate; in clk_dummy_minimize_rate()
65 unsigned long rate, in clk_dummy_set_rate() argument
71 ctx->rate = rate; in clk_dummy_set_rate()
176 ctx->rate = DUMMY_CLOCK_INIT_RATE; in clk_test_init_with_ops()
220 unsigned long rate; in clk_test_get_rate() local
222 rate = clk_get_rate(clk); in clk_test_get_rate()
223 KUNIT_ASSERT_GT(test, rate, 0); in clk_test_get_rate()
[all …]
Dclk-cdce925.c109 static void cdce925_pll_find_rate(unsigned long rate, in cdce925_pll_find_rate() argument
116 if (rate <= parent_rate) { in cdce925_pll_find_rate()
118 rate = parent_rate; in cdce925_pll_find_rate()
123 if (rate < CDCE925_PLL_FREQUENCY_MIN) in cdce925_pll_find_rate()
124 rate = CDCE925_PLL_FREQUENCY_MIN; in cdce925_pll_find_rate()
125 else if (rate > CDCE925_PLL_FREQUENCY_MAX) in cdce925_pll_find_rate()
126 rate = CDCE925_PLL_FREQUENCY_MAX; in cdce925_pll_find_rate()
128 g = gcd(rate, parent_rate); in cdce925_pll_find_rate()
130 un = rate / g; in cdce925_pll_find_rate()
146 static long cdce925_pll_round_rate(struct clk_hw *hw, unsigned long rate, in cdce925_pll_round_rate() argument
[all …]
Dclk-multiplier.c32 unsigned long rate, in __get_mult() argument
36 return DIV_ROUND_CLOSEST(rate, parent_rate); in __get_mult()
38 return rate / parent_rate; in __get_mult()
56 static bool __is_best_rate(unsigned long rate, unsigned long new, in __is_best_rate() argument
60 return abs(rate - new) < abs(rate - best); in __is_best_rate()
62 return new >= rate && new < best; in __is_best_rate()
65 static unsigned long __bestmult(struct clk_hw *hw, unsigned long rate, in __bestmult() argument
76 bestmult = rate / orig_parent_rate; in __bestmult()
91 if (rate == orig_parent_rate * i) { in __bestmult()
102 rate / i); in __bestmult()
[all …]
/linux-6.6.21/drivers/net/wireless/intel/iwlwifi/mvm/ !
Drs.c116 struct rs_rate *rate,
128 struct rs_rate *rate, in rs_ant_allow() argument
135 struct rs_rate *rate, in rs_mimo_allow() argument
157 struct rs_rate *rate, in rs_siso_allow() argument
167 struct rs_rate *rate, in rs_sgi_allow() argument
173 if (is_ht20(rate) && (ht_cap->cap & in rs_sgi_allow()
176 if (is_ht40(rate) && (ht_cap->cap & in rs_sgi_allow()
179 if (is_ht80(rate) && (vht_cap->cap & in rs_sgi_allow()
182 if (is_ht160(rate) && (vht_cap->cap & in rs_sgi_allow()
477 static char *rs_pretty_rate(const struct rs_rate *rate) in rs_pretty_rate() argument
[all …]
Drs.h184 #define is_legacy(rate) is_type_legacy((rate)->type) argument
185 #define is_ht_siso(rate) is_type_ht_siso((rate)->type) argument
186 #define is_ht_mimo2(rate) is_type_ht_mimo2((rate)->type) argument
187 #define is_vht_siso(rate) is_type_vht_siso((rate)->type) argument
188 #define is_vht_mimo2(rate) is_type_vht_mimo2((rate)->type) argument
189 #define is_siso(rate) is_type_siso((rate)->type) argument
190 #define is_mimo2(rate) is_type_mimo2((rate)->type) argument
191 #define is_mimo(rate) is_type_mimo((rate)->type) argument
192 #define is_ht(rate) is_type_ht((rate)->type) argument
193 #define is_vht(rate) is_type_vht((rate)->type) argument
[all …]
/linux-6.6.21/net/wireless/ !
Dutil.c1213 static u32 cfg80211_calculate_bitrate_ht(struct rate_info *rate) in cfg80211_calculate_bitrate_ht() argument
1218 if (WARN_ON_ONCE(rate->mcs >= 32)) in cfg80211_calculate_bitrate_ht()
1221 modulation = rate->mcs & 7; in cfg80211_calculate_bitrate_ht()
1222 streams = (rate->mcs >> 3) + 1; in cfg80211_calculate_bitrate_ht()
1224 bitrate = (rate->bw == RATE_INFO_BW_40) ? 13500000 : 6500000; in cfg80211_calculate_bitrate_ht()
1235 if (rate->flags & RATE_INFO_FLAGS_SHORT_GI) in cfg80211_calculate_bitrate_ht()
1242 static u32 cfg80211_calculate_bitrate_dmg(struct rate_info *rate) in cfg80211_calculate_bitrate_dmg() argument
1283 if (WARN_ON_ONCE(rate->mcs >= ARRAY_SIZE(__mcs2bitrate))) in cfg80211_calculate_bitrate_dmg()
1286 return __mcs2bitrate[rate->mcs]; in cfg80211_calculate_bitrate_dmg()
1289 static u32 cfg80211_calculate_bitrate_extended_sc_dmg(struct rate_info *rate) in cfg80211_calculate_bitrate_extended_sc_dmg() argument
[all …]
/linux-6.6.21/drivers/clk/samsung/ !
Dclk-pll.c39 struct samsung_clk_pll *pll, unsigned long rate) in samsung_get_pll_settings() argument
45 if (rate == rate_table[i].rate) in samsung_get_pll_settings()
61 if (drate >= rate_table[i].rate) in samsung_pll_round_rate()
62 return rate_table[i].rate; in samsung_pll_round_rate()
66 return rate_table[i - 1].rate; in samsung_pll_round_rate()
238 const struct samsung_pll_rate_table *rate, u32 pll_con) in samsung_pll35xx_mp_change() argument
245 return (rate->mdiv != old_mdiv || rate->pdiv != old_pdiv); in samsung_pll35xx_mp_change()
252 const struct samsung_pll_rate_table *rate; in samsung_pll35xx_set_rate() local
256 rate = samsung_get_pll_settings(pll, drate); in samsung_pll35xx_set_rate()
257 if (!rate) { in samsung_pll35xx_set_rate()
[all …]
/linux-6.6.21/drivers/clk/imx/ !
Dclk-pll14xx.c92 struct clk_pll14xx *pll, unsigned long rate) in imx_get_pll_settings() argument
98 if (rate == rate_table[i].rate) in imx_get_pll_settings()
119 unsigned long rate, unsigned long prate) in pll1443x_calc_kdiv() argument
124 kdiv = ((rate * ((pdiv * 65536) << sdiv) + prate / 2) / prate) - (mdiv * 65536); in pll1443x_calc_kdiv()
129 static void imx_pll14xx_calc_settings(struct clk_pll14xx *pll, unsigned long rate, in imx_pll14xx_calc_settings() argument
149 tt = imx_get_pll_settings(pll, rate); in imx_pll14xx_calc_settings()
152 clk_hw_get_name(&pll->hw), prate, rate); in imx_pll14xx_calc_settings()
153 t->rate = tt->rate; in imx_pll14xx_calc_settings()
171 if (rate >= rate_min && rate <= rate_max) { in imx_pll14xx_calc_settings()
172 kdiv = pll1443x_calc_kdiv(mdiv, pdiv, sdiv, rate, prate); in imx_pll14xx_calc_settings()
[all …]
Dclk-pllv3.c120 static long clk_pllv3_round_rate(struct clk_hw *hw, unsigned long rate, in clk_pllv3_round_rate() argument
125 return (rate >= parent_rate * 22) ? parent_rate * 22 : in clk_pllv3_round_rate()
129 static int clk_pllv3_set_rate(struct clk_hw *hw, unsigned long rate, in clk_pllv3_set_rate() argument
135 if (rate == parent_rate * 22) in clk_pllv3_set_rate()
137 else if (rate == parent_rate * 20) in clk_pllv3_set_rate()
168 static long clk_pllv3_sys_round_rate(struct clk_hw *hw, unsigned long rate, in clk_pllv3_sys_round_rate() argument
176 if (rate > max_rate) in clk_pllv3_sys_round_rate()
177 rate = max_rate; in clk_pllv3_sys_round_rate()
178 else if (rate < min_rate) in clk_pllv3_sys_round_rate()
179 rate = min_rate; in clk_pllv3_sys_round_rate()
[all …]
/linux-6.6.21/arch/arm/mach-omap1/ !
Dclock.c138 static int calc_dsor_exp(unsigned long rate, unsigned long realrate) in calc_dsor_exp() argument
157 if (realrate <= rate) in calc_dsor_exp()
172 clk->rate = p_rate / dsor; in omap1_ckctl_recalc()
173 return clk->rate; in omap1_ckctl_recalc()
230 int omap1_select_table_rate(struct omap1_clk *clk, unsigned long rate, unsigned long p_rate) in omap1_select_table_rate() argument
236 ref_rate = ck_ref_p->rate; in omap1_select_table_rate()
238 for (ptr = omap1_rate_table; ptr->rate; ptr++) { in omap1_select_table_rate()
246 if (ptr->rate <= rate) in omap1_select_table_rate()
250 if (!ptr->rate) in omap1_select_table_rate()
260 ck_dpll1_p->rate = ptr->pll_rate; in omap1_select_table_rate()
[all …]
/linux-6.6.21/sound/firewire/fireface/ !
Dff-protocol-latter.c71 static int parse_clock_bits(u32 data, unsigned int *rate, in parse_clock_bits() argument
76 unsigned int rate; in parse_clock_bits() member
121 *rate = rate_entry->rate; in parse_clock_bits()
141 static int latter_get_clock(struct snd_ff *ff, unsigned int *rate, in latter_get_clock() argument
154 return parse_clock_bits(data, rate, src, ff->unit_version); in latter_get_clock()
172 static int latter_allocate_resources(struct snd_ff *ff, unsigned int rate) in latter_allocate_resources() argument
182 if (rate % 48000 == 0) in latter_allocate_resources()
184 else if (rate % 44100 == 0) in latter_allocate_resources()
186 else if (rate % 32000 == 0) in latter_allocate_resources()
191 if (rate >= 64000 && rate < 128000) in latter_allocate_resources()
[all …]
/linux-6.6.21/drivers/net/wireless/realtek/rtw88/ !
Dphy.c1145 u32 addr, u32 mask, u32 val, u8 *rate, in rtw_phy_get_rate_values_of_txpwr_by_rate() argument
1153 rate[0] = DESC_RATE6M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1154 rate[1] = DESC_RATE9M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1155 rate[2] = DESC_RATE12M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1156 rate[3] = DESC_RATE18M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1163 rate[0] = DESC_RATE24M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1164 rate[1] = DESC_RATE36M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1165 rate[2] = DESC_RATE48M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1166 rate[3] = DESC_RATE54M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1172 rate[0] = DESC_RATE1M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
[all …]
/linux-6.6.21/sound/soc/mediatek/mt8186/ !
Dmt8186-afe-control.c75 unsigned int mt8186_general_rate_transform(struct device *dev, unsigned int rate) in mt8186_general_rate_transform() argument
77 switch (rate) { in mt8186_general_rate_transform()
112 __func__, rate, MTK_AFE_RATE_48K); in mt8186_general_rate_transform()
118 static unsigned int tdm_rate_transform(struct device *dev, unsigned int rate) in tdm_rate_transform() argument
120 switch (rate) { in tdm_rate_transform()
159 __func__, rate, MTK_AFE_TDM_RATE_48K); in tdm_rate_transform()
165 static unsigned int pcm_rate_transform(struct device *dev, unsigned int rate) in pcm_rate_transform() argument
167 switch (rate) { in pcm_rate_transform()
178 __func__, rate, MTK_AFE_PCM_RATE_48K); in pcm_rate_transform()
184 unsigned int mt8186_tdm_relatch_rate_transform(struct device *dev, unsigned int rate) in mt8186_tdm_relatch_rate_transform() argument
[all …]
/linux-6.6.21/sound/soc/mediatek/mt8192/ !
Dmt8192-afe-control.c45 unsigned int rate) in mt8192_general_rate_transform() argument
47 switch (rate) { in mt8192_general_rate_transform()
83 rate, MTK_AFE_RATE_48K); in mt8192_general_rate_transform()
89 unsigned int rate) in dai_memif_rate_transform() argument
91 switch (rate) { in dai_memif_rate_transform()
103 rate, MTK_AFE_DAI_MEMIF_RATE_16K); in dai_memif_rate_transform()
109 unsigned int rate) in pcm_rate_transform() argument
111 switch (rate) { in pcm_rate_transform()
123 rate, MTK_AFE_PCM_RATE_32K); in pcm_rate_transform()
129 unsigned int rate, int aud_blk) in mt8192_rate_transform() argument
[all …]
/linux-6.6.21/drivers/clk/tegra/ !
Dclk-tegra-super-cclk.c43 static int cclk_super_set_rate(struct clk_hw *hw, unsigned long rate, in cclk_super_set_rate() argument
46 return tegra_clk_super_ops.set_rate(hw, rate, parent_rate); in cclk_super_set_rate()
75 long rate = req->rate; in cclk_super_determine_rate() local
86 if (rate <= pllp_rate) { in cclk_super_determine_rate()
88 rate = pllp_rate; in cclk_super_determine_rate()
91 .rate = req->rate, in cclk_super_determine_rate()
99 rate = parent.rate; in cclk_super_determine_rate()
104 req->rate = rate; in cclk_super_determine_rate()
106 rate = clk_hw_round_rate(pllx_hw, rate); in cclk_super_determine_rate()
107 req->best_parent_rate = rate; in cclk_super_determine_rate()
[all …]
/linux-6.6.21/arch/mips/lantiq/ !
Dclk.c32 cpu_clk_generic[0].rate = cpu; in clkdev_add_static()
33 cpu_clk_generic[1].rate = fpi; in clkdev_add_static()
34 cpu_clk_generic[2].rate = io; in clkdev_add_static()
35 cpu_clk_generic[3].rate = ppe; in clkdev_add_static()
71 if (clk->rate != 0) in clk_get_rate()
72 return clk->rate; in clk_get_rate()
81 int clk_set_rate(struct clk *clk, unsigned long rate) in clk_set_rate() argument
88 while (*r && (*r != rate)) in clk_set_rate()
92 clk->cl.dev_id, clk->cl.con_id, rate); in clk_set_rate()
96 clk->rate = rate; in clk_set_rate()
[all …]
/linux-6.6.21/arch/sh/kernel/cpu/sh4/ !
Dclock-sh4-202.c25 return clk->parent->rate / frqcr3_divisors[idx]; in emi_clk_recalc()
28 static inline int frqcr3_lookup(struct clk *clk, unsigned long rate) in frqcr3_lookup() argument
30 int divisor = clk->parent->rate / rate; in frqcr3_lookup()
53 return clk->parent->rate / frqcr3_divisors[idx]; in femi_clk_recalc()
81 if (clk->ops->set_rate(clk, clk->parent->rate / divisor) == 0) in shoc_clk_init()
91 return clk->parent->rate / frqcr3_divisors[idx]; in shoc_clk_recalc()
94 static int shoc_clk_verify_rate(struct clk *clk, unsigned long rate) in shoc_clk_verify_rate() argument
101 if (rate > bclk_rate) in shoc_clk_verify_rate()
103 if (rate > 66000000) in shoc_clk_verify_rate()
109 static int shoc_clk_set_rate(struct clk *clk, unsigned long rate) in shoc_clk_set_rate() argument
[all …]

12345678910>>...96