/kernel/linux/linux-5.10/arch/arm/mach-ep93xx/ |
D | clock.c | 29 unsigned long rate; member 36 int (*set_rate)(struct clk *clk, unsigned long rate); 42 static int set_keytchclk_rate(struct clk *clk, unsigned long rate); 43 static int set_div_rate(struct clk *clk, unsigned long rate); 44 static int set_i2s_sclk_rate(struct clk *clk, unsigned long rate); 45 static int set_i2s_lrclk_rate(struct clk *clk, unsigned long rate); 48 .rate = EP93XX_EXT_CLK_RATE, 107 .rate = EP93XX_EXT_CLK_RATE, 111 .rate = EP93XX_EXT_CLK_RATE, 312 unsigned long rate = clk_get_rate(clk->parent); in get_uart_rate() local [all …]
|
/kernel/linux/linux-5.10/drivers/staging/rtl8723bs/include/ |
D | hal_com.h | 113 #define HDATA_RATE(rate)\ argument 114 (rate == DESC_RATE1M) ? "CCK_1M" : \ 115 (rate == DESC_RATE2M) ? "CCK_2M" : \ 116 (rate == DESC_RATE5_5M) ? "CCK5_5M" : \ 117 (rate == DESC_RATE11M) ? "CCK_11M" : \ 118 (rate == DESC_RATE6M) ? "OFDM_6M" : \ 119 (rate == DESC_RATE9M) ? "OFDM_9M" : \ 120 (rate == DESC_RATE12M) ? "OFDM_12M" : \ 121 (rate == DESC_RATE18M) ? "OFDM_18M" : \ 122 (rate == DESC_RATE24M) ? "OFDM_24M" : \ [all …]
|
/kernel/linux/linux-5.10/drivers/clk/rockchip/ |
D | clk-pll.c | 51 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 …]
|
/kernel/linux/linux-5.10/drivers/clk/sunxi-ng/ |
D | ccu_nm.c | 22 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() 30 static void ccu_nm_find_best(unsigned long parent, unsigned long rate, in ccu_nm_find_best() argument 42 if (tmp_rate > rate) in ccu_nm_find_best() 45 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_nm_find_best() 82 unsigned long rate; in ccu_nm_recalc_rate() local 87 rate = ccu_frac_helper_read_rate(&nm->common, &nm->frac); in ccu_nm_recalc_rate() 90 rate /= nm->fixed_post_div; in ccu_nm_recalc_rate() [all …]
|
D | ccu_mp.c | 13 static void 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() 42 unsigned long rate, in ccu_mp_find_best_with_parent_adj() argument 59 maxdiv = min(ULONG_MAX / rate, maxdiv); in ccu_mp_find_best_with_parent_adj() 68 if (rate * div == parent_rate_saved) { in ccu_mp_find_best_with_parent_adj() 76 return rate; in ccu_mp_find_best_with_parent_adj() 79 parent_rate = clk_hw_round_rate(hw, rate * div); in ccu_mp_find_best_with_parent_adj() 82 if (now <= rate && now > best_rate) { in ccu_mp_find_best_with_parent_adj() 86 if (now == rate) in ccu_mp_find_best_with_parent_adj() [all …]
|
D | ccu_nkmp.c | 24 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 void 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() 95 unsigned long n, m, k, p, rate; in ccu_nkmp_recalc_rate() local 121 rate = ccu_nkmp_calc_rate(parent_rate, n, k, m, 1 << p); in ccu_nkmp_recalc_rate() 123 rate /= nkmp->fixed_post_div; in ccu_nkmp_recalc_rate() [all …]
|
/kernel/linux/linux-5.10/arch/c6x/platforms/ |
D | pll.c | 77 return clk->rate; in clk_get_rate() 81 long clk_round_rate(struct clk *clk, unsigned long rate) in clk_round_rate() argument 87 return clk->round_rate(clk, rate); in clk_round_rate() 89 return clk->rate; in clk_round_rate() 100 clk->rate = clk->recalc(clk); in propagate_rate() 105 int clk_set_rate(struct clk *clk, unsigned long rate) in clk_set_rate() argument 114 ret = clk->set_rate(clk, rate); in clk_set_rate() 119 clk->rate = clk->recalc(clk); in clk_set_rate() 147 clk->rate = clk->recalc(clk); in clk_set_parent() 160 if (WARN(clk->parent && !clk->parent->rate, in clk_register() [all …]
|
/kernel/linux/linux-5.10/drivers/net/wireless/intel/iwlwifi/mvm/ |
D | rs.c | 121 struct rs_rate *rate, 133 struct rs_rate *rate, in rs_ant_allow() argument 140 struct rs_rate *rate, in rs_mimo_allow() argument 162 struct rs_rate *rate, in rs_siso_allow() argument 172 struct rs_rate *rate, in rs_sgi_allow() argument 178 if (is_ht20(rate) && (ht_cap->cap & in rs_sgi_allow() 181 if (is_ht40(rate) && (ht_cap->cap & in rs_sgi_allow() 184 if (is_ht80(rate) && (vht_cap->cap & in rs_sgi_allow() 187 if (is_ht160(rate) && (vht_cap->cap & in rs_sgi_allow() 521 static char *rs_pretty_rate(const struct rs_rate *rate) in rs_pretty_rate() argument [all …]
|
D | rs.h | 195 #define is_legacy(rate) is_type_legacy((rate)->type) argument 196 #define is_ht_siso(rate) is_type_ht_siso((rate)->type) argument 197 #define is_ht_mimo2(rate) is_type_ht_mimo2((rate)->type) argument 198 #define is_vht_siso(rate) is_type_vht_siso((rate)->type) argument 199 #define is_vht_mimo2(rate) is_type_vht_mimo2((rate)->type) argument 200 #define is_siso(rate) is_type_siso((rate)->type) argument 201 #define is_mimo2(rate) is_type_mimo2((rate)->type) argument 202 #define is_mimo(rate) is_type_mimo((rate)->type) argument 203 #define is_ht(rate) is_type_ht((rate)->type) argument 204 #define is_vht(rate) is_type_vht((rate)->type) argument [all …]
|
/kernel/linux/linux-5.10/arch/arm/mach-omap1/ |
D | clock.c | 54 return clk->parent->rate / div; in omap1_sossi_recalc() 132 static int calc_dsor_exp(struct clk *clk, unsigned long rate) in calc_dsor_exp() argument 153 realrate = parent->rate; in calc_dsor_exp() 155 if (realrate <= rate) in calc_dsor_exp() 169 return clk->parent->rate / dsor; in omap1_ckctl_recalc() 187 return clk->parent->rate / dsor; in omap1_ckctl_recalc_dsp_domain() 191 int omap1_select_table_rate(struct clk *clk, unsigned long rate) in omap1_select_table_rate() argument 197 ref_rate = ck_ref_p->rate; in omap1_select_table_rate() 199 for (ptr = omap1_rate_table; ptr->rate; ptr++) { in omap1_select_table_rate() 207 if (ptr->rate <= rate) in omap1_select_table_rate() [all …]
|
/kernel/linux/linux-5.10/drivers/net/wireless/realtek/rtw88/ |
D | util.c | 82 void rtw_desc_to_mcsrate(u16 rate, u8 *mcs, u8 *nss) in rtw_desc_to_mcsrate() argument 84 if (rate <= DESC_RATE54M) in rtw_desc_to_mcsrate() 87 if (rate >= DESC_RATEVHT1SS_MCS0 && in rtw_desc_to_mcsrate() 88 rate <= DESC_RATEVHT1SS_MCS9) { in rtw_desc_to_mcsrate() 90 *mcs = rate - DESC_RATEVHT1SS_MCS0; in rtw_desc_to_mcsrate() 91 } else if (rate >= DESC_RATEVHT2SS_MCS0 && in rtw_desc_to_mcsrate() 92 rate <= DESC_RATEVHT2SS_MCS9) { in rtw_desc_to_mcsrate() 94 *mcs = rate - DESC_RATEVHT2SS_MCS0; in rtw_desc_to_mcsrate() 95 } else if (rate >= DESC_RATEVHT3SS_MCS0 && in rtw_desc_to_mcsrate() 96 rate <= DESC_RATEVHT3SS_MCS9) { in rtw_desc_to_mcsrate() [all …]
|
D | phy.c | 938 u32 addr, u32 mask, u32 val, u8 *rate, in rtw_phy_get_rate_values_of_txpwr_by_rate() argument 946 rate[0] = DESC_RATE6M; in rtw_phy_get_rate_values_of_txpwr_by_rate() 947 rate[1] = DESC_RATE9M; in rtw_phy_get_rate_values_of_txpwr_by_rate() 948 rate[2] = DESC_RATE12M; in rtw_phy_get_rate_values_of_txpwr_by_rate() 949 rate[3] = DESC_RATE18M; in rtw_phy_get_rate_values_of_txpwr_by_rate() 956 rate[0] = DESC_RATE24M; in rtw_phy_get_rate_values_of_txpwr_by_rate() 957 rate[1] = DESC_RATE36M; in rtw_phy_get_rate_values_of_txpwr_by_rate() 958 rate[2] = DESC_RATE48M; in rtw_phy_get_rate_values_of_txpwr_by_rate() 959 rate[3] = DESC_RATE54M; in rtw_phy_get_rate_values_of_txpwr_by_rate() 965 rate[0] = DESC_RATE1M; in rtw_phy_get_rate_values_of_txpwr_by_rate() [all …]
|
/kernel/linux/linux-5.10/drivers/clk/samsung/ |
D | clk-pll.c | 36 struct samsung_clk_pll *pll, unsigned long rate) in samsung_get_pll_settings() argument 42 if (rate == rate_table[i].rate) in samsung_get_pll_settings() 58 if (drate >= rate_table[i].rate) in samsung_pll_round_rate() 59 return rate_table[i].rate; in samsung_pll_round_rate() 63 return rate_table[i - 1].rate; in samsung_pll_round_rate() 194 const struct samsung_pll_rate_table *rate, u32 pll_con) in samsung_pll35xx_mp_change() argument 201 return (rate->mdiv != old_mdiv || rate->pdiv != old_pdiv); in samsung_pll35xx_mp_change() 208 const struct samsung_pll_rate_table *rate; in samsung_pll35xx_set_rate() local 212 rate = samsung_get_pll_settings(pll, drate); in samsung_pll35xx_set_rate() 213 if (!rate) { in samsung_pll35xx_set_rate() [all …]
|
/kernel/linux/linux-5.10/sound/firewire/fireface/ |
D | ff-protocol-latter.c | 73 static int parse_clock_bits(u32 data, unsigned int *rate, in parse_clock_bits() argument 78 unsigned int rate; in parse_clock_bits() member 123 *rate = rate_entry->rate; in parse_clock_bits() 143 static int latter_get_clock(struct snd_ff *ff, unsigned int *rate, in latter_get_clock() argument 156 return parse_clock_bits(data, rate, src, ff->unit_version); in latter_get_clock() 174 static int latter_allocate_resources(struct snd_ff *ff, unsigned int rate) in latter_allocate_resources() argument 184 if (rate % 48000 == 0) in latter_allocate_resources() 186 else if (rate % 44100 == 0) in latter_allocate_resources() 188 else if (rate % 32000 == 0) in latter_allocate_resources() 193 if (rate >= 64000 && rate < 128000) in latter_allocate_resources() [all …]
|
/kernel/linux/linux-5.10/drivers/memory/tegra/ |
D | tegra20-emc.c | 141 unsigned long rate; member 183 unsigned long rate) in tegra_emc_find_timing() argument 189 if (emc->timings[i].rate >= rate) { in tegra_emc_find_timing() 196 dev_err(emc->dev, "no timing for rate %lu\n", rate); in tegra_emc_find_timing() 203 static int emc_prepare_timing_change(struct tegra_emc *emc, unsigned long rate) in emc_prepare_timing_change() argument 205 struct emc_timing *timing = tegra_emc_find_timing(emc, rate); in emc_prepare_timing_change() 212 __func__, timing->rate, rate); in emc_prepare_timing_change() 285 u32 rate; in load_one_timing_from_dt() local 293 err = of_property_read_u32(node, "clock-frequency", &rate); in load_one_timing_from_dt() 314 timing->rate = rate * 2 * 1000; in load_one_timing_from_dt() [all …]
|
D | tegra186-emc.c | 16 unsigned long rate; member 60 unsigned long rate) in tegra186_emc_validate_rate() argument 65 if (rate == emc->dvfs[i].rate) in tegra186_emc_validate_rate() 79 seq_printf(s, "%s%lu", prefix, emc->dvfs[i].rate); in tegra186_emc_debug_available_rates_show() 102 static int tegra186_emc_debug_min_rate_get(void *data, u64 *rate) in tegra186_emc_debug_min_rate_get() argument 106 *rate = emc->debugfs.min_rate; in tegra186_emc_debug_min_rate_get() 111 static int tegra186_emc_debug_min_rate_set(void *data, u64 rate) in tegra186_emc_debug_min_rate_set() argument 116 if (!tegra186_emc_validate_rate(emc, rate)) in tegra186_emc_debug_min_rate_set() 119 err = clk_set_min_rate(emc->clk, rate); in tegra186_emc_debug_min_rate_set() 123 emc->debugfs.min_rate = rate; in tegra186_emc_debug_min_rate_set() [all …]
|
/kernel/linux/linux-5.10/drivers/clk/actions/ |
D | owl-composite.c | 56 static long owl_comp_div_round_rate(struct clk_hw *hw, unsigned long rate, in owl_comp_div_round_rate() argument 61 return owl_divider_helper_round_rate(&comp->common, &comp->rate.div_hw, in owl_comp_div_round_rate() 62 rate, parent_rate); in owl_comp_div_round_rate() 70 return owl_divider_helper_recalc_rate(&comp->common, &comp->rate.div_hw, in owl_comp_div_recalc_rate() 74 static int owl_comp_div_set_rate(struct clk_hw *hw, unsigned long rate, in owl_comp_div_set_rate() argument 79 return owl_divider_helper_set_rate(&comp->common, &comp->rate.div_hw, in owl_comp_div_set_rate() 80 rate, parent_rate); in owl_comp_div_set_rate() 83 static long owl_comp_fact_round_rate(struct clk_hw *hw, unsigned long rate, in owl_comp_fact_round_rate() argument 89 &comp->rate.factor_hw, in owl_comp_fact_round_rate() 90 rate, parent_rate); in owl_comp_fact_round_rate() [all …]
|
/kernel/linux/linux-5.10/drivers/clk/ |
D | clk-cdce925.c | 109 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 …]
|
D | clk-multiplier.c | 32 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 …]
|
/kernel/linux/linux-5.10/drivers/clk/meson/ |
D | clk-pll.c | 60 u64 rate = (u64)parent_rate * m; in __pll_params_to_rate() local 65 rate += DIV_ROUND_UP_ULL(frac_rate, in __pll_params_to_rate() 69 return DIV_ROUND_UP_ULL(rate, n); in __pll_params_to_rate() 98 static unsigned int __pll_params_with_frac(unsigned long rate, in __pll_params_with_frac() argument 105 u64 val = (u64)rate * n; in __pll_params_with_frac() 108 if (rate < parent_rate * m / n) in __pll_params_with_frac() 121 static bool meson_clk_pll_is_better(unsigned long rate, in meson_clk_pll_is_better() argument 128 if (abs(now - rate) < abs(best - rate)) in meson_clk_pll_is_better() 132 if (now <= rate && best < now) in meson_clk_pll_is_better() 153 static unsigned int meson_clk_get_pll_range_m(unsigned long rate, in meson_clk_get_pll_range_m() argument [all …]
|
/kernel/linux/linux-5.10/arch/sh/kernel/cpu/sh4/ |
D | clock-sh4-202.c | 25 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 …]
|
/kernel/linux/linux-5.10/arch/mips/lantiq/ |
D | clk.c | 32 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() 70 if (clk->rate != 0) in clk_get_rate() 71 return clk->rate; in clk_get_rate() 80 int clk_set_rate(struct clk *clk, unsigned long rate) in clk_set_rate() argument 87 while (*r && (*r != rate)) in clk_set_rate() 91 clk->cl.dev_id, clk->cl.con_id, rate); in clk_set_rate() 95 clk->rate = rate; in clk_set_rate() [all …]
|
/kernel/linux/linux-5.10/drivers/clk/qcom/ |
D | clk-rcg2.c | 148 calc_rate(unsigned long rate, u32 m, u32 n, u32 mode, u32 hid_div) in calc_rate() argument 151 rate *= 2; in calc_rate() 152 rate /= hid_div + 1; in calc_rate() 156 u64 tmp = rate; in calc_rate() 159 rate = tmp; in calc_rate() 162 return rate; in calc_rate() 196 unsigned long clk_flags, rate = req->rate; in _freq_tbl_determine_rate() local 203 f = qcom_find_freq_floor(f, rate); in _freq_tbl_determine_rate() 206 f = qcom_find_freq(f, rate); in _freq_tbl_determine_rate() 225 rate = f->freq; in _freq_tbl_determine_rate() [all …]
|
/kernel/linux/linux-5.10/arch/mips/ar7/ |
D | clock.c | 88 .rate = 125000000, 92 .rate = 150000000, 182 base_clock = cpu_clk.rate; in tnetd7300_get_clock() 209 int base_clock = bus_clk.rate; in tnetd7300_set_clock() 213 base_clock = bus_clk.rate; in tnetd7300_set_clock() 222 base_clock = cpu_clk.rate; in tnetd7300_set_clock() 244 bus_clk.rate = tnetd7300_get_clock(BUS_PLL_SOURCE_SHIFT, in tnetd7300_init_clocks() 248 cpu_clk.rate = tnetd7300_get_clock(CPU_PLL_SOURCE_SHIFT, in tnetd7300_init_clocks() 251 cpu_clk.rate = bus_clk.rate; in tnetd7300_init_clocks() 253 if (dsp_clk.rate == 250000000) in tnetd7300_init_clocks() [all …]
|
/kernel/linux/linux-5.10/drivers/clk/zte/ |
D | clk.c | 25 static int rate_to_idx(struct clk_zx_pll *zx_pll, unsigned long rate) in rate_to_idx() argument 31 if (config[i].rate > rate) in rate_to_idx() 34 if (config[i].rate == rate) in rate_to_idx() 75 return zx_pll->lookup_table[idx].rate; in zx_pll_recalc_rate() 78 static long zx_pll_round_rate(struct clk_hw *hw, unsigned long rate, in zx_pll_round_rate() argument 84 idx = rate_to_idx(zx_pll, rate); in zx_pll_round_rate() 86 return zx_pll->lookup_table[idx].rate; in zx_pll_round_rate() 89 static int zx_pll_set_rate(struct clk_hw *hw, unsigned long rate, in zx_pll_set_rate() argument 97 idx = rate_to_idx(zx_pll, rate); in zx_pll_set_rate() 189 static u32 calc_reg(u32 parent_rate, u32 rate) in calc_reg() argument [all …]
|