/Linux-v4.19/arch/unicore32/kernel/ |
D | clock.c | 32 unsigned long rate; member 38 .rate = CLOCK_TICK_RATE, 95 return clk->rate; in clk_get_rate() 100 unsigned long rate; member 104 {.rate = 25175000, .cfg = 0x00002001, .div = 0x9}, 105 {.rate = 31500000, .cfg = 0x00002001, .div = 0x7}, 106 {.rate = 40000000, .cfg = 0x00003801, .div = 0x9}, 107 {.rate = 49500000, .cfg = 0x00003801, .div = 0x7}, 108 {.rate = 65000000, .cfg = 0x00002c01, .div = 0x4}, 109 {.rate = 78750000, .cfg = 0x00002400, .div = 0x7}, [all …]
|
/Linux-v4.19/arch/arm/mach-ep93xx/ |
D | clock.c | 32 unsigned long rate; member 39 int (*set_rate)(struct clk *clk, unsigned long rate); 45 static int set_keytchclk_rate(struct clk *clk, unsigned long rate); 46 static int set_div_rate(struct clk *clk, unsigned long rate); 47 static int set_i2s_sclk_rate(struct clk *clk, unsigned long rate); 48 static int set_i2s_lrclk_rate(struct clk *clk, unsigned long rate); 51 .rate = EP93XX_EXT_CLK_RATE, 110 .rate = EP93XX_EXT_CLK_RATE, 114 .rate = EP93XX_EXT_CLK_RATE, 315 unsigned long rate = clk_get_rate(clk->parent); in get_uart_rate() local [all …]
|
/Linux-v4.19/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 …]
|
/Linux-v4.19/drivers/clk/rockchip/ |
D | clk-pll.c | 59 struct rockchip_clk_pll *pll, unsigned long rate) in rockchip_get_pll_settings() argument 65 if (rate == rate_table[i].rate) in rockchip_get_pll_settings() 81 if (drate >= rate_table[i].rate) in rockchip_pll_round_rate() 82 return rate_table[i].rate; in rockchip_pll_round_rate() 86 return rate_table[i - 1].rate; in rockchip_pll_round_rate() 138 struct rockchip_pll_rate_table *rate) in rockchip_rk3036_pll_get_params() argument 143 rate->fbdiv = ((pllcon >> RK3036_PLLCON0_FBDIV_SHIFT) in rockchip_rk3036_pll_get_params() 145 rate->postdiv1 = ((pllcon >> RK3036_PLLCON0_POSTDIV1_SHIFT) in rockchip_rk3036_pll_get_params() 149 rate->refdiv = ((pllcon >> RK3036_PLLCON1_REFDIV_SHIFT) in rockchip_rk3036_pll_get_params() 151 rate->postdiv2 = ((pllcon >> RK3036_PLLCON1_POSTDIV2_SHIFT) in rockchip_rk3036_pll_get_params() [all …]
|
/Linux-v4.19/arch/c6x/platforms/ |
D | pll.c | 81 return clk->rate; in clk_get_rate() 85 long clk_round_rate(struct clk *clk, unsigned long rate) in clk_round_rate() argument 91 return clk->round_rate(clk, rate); in clk_round_rate() 93 return clk->rate; in clk_round_rate() 104 clk->rate = clk->recalc(clk); in propagate_rate() 109 int clk_set_rate(struct clk *clk, unsigned long rate) in clk_set_rate() argument 118 ret = clk->set_rate(clk, rate); in clk_set_rate() 123 clk->rate = clk->recalc(clk); in clk_set_rate() 151 clk->rate = clk->recalc(clk); in clk_set_parent() 164 if (WARN(clk->parent && !clk->parent->rate, in clk_register() [all …]
|
/Linux-v4.19/drivers/clk/sunxi-ng/ |
D | ccu_nm.c | 22 static void ccu_nm_find_best(unsigned long parent, unsigned long rate, in ccu_nm_find_best() argument 33 if (tmp_rate > rate) in ccu_nm_find_best() 36 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_nm_find_best() 73 unsigned long rate; in ccu_nm_recalc_rate() local 78 rate = ccu_frac_helper_read_rate(&nm->common, &nm->frac); in ccu_nm_recalc_rate() 81 rate /= nm->fixed_post_div; in ccu_nm_recalc_rate() 83 return rate; in ccu_nm_recalc_rate() 101 rate = ccu_sdm_helper_read_rate(&nm->common, &nm->sdm, m, n); in ccu_nm_recalc_rate() 103 rate = parent_rate * n / m; in ccu_nm_recalc_rate() 106 rate /= nm->fixed_post_div; in ccu_nm_recalc_rate() [all …]
|
D | ccu_mp.c | 16 static void ccu_mp_find_best(unsigned long parent, unsigned long rate, in ccu_mp_find_best() argument 28 if (tmp_rate > rate) in ccu_mp_find_best() 31 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_mp_find_best() 46 unsigned long rate, in ccu_mp_round_rate() argument 54 rate *= cmp->fixed_post_div; in ccu_mp_round_rate() 59 ccu_mp_find_best(*parent_rate, rate, max_m, max_p, &m, &p); in ccu_mp_round_rate() 60 rate = *parent_rate / p / m; in ccu_mp_round_rate() 63 rate /= cmp->fixed_post_div; in ccu_mp_round_rate() 65 return rate; in ccu_mp_round_rate() 93 unsigned long rate; in ccu_mp_recalc_rate() local [all …]
|
D | ccu_nk.c | 21 static void ccu_nk_find_best(unsigned long parent, unsigned long rate, in ccu_nk_find_best() argument 32 if (tmp_rate > rate) in ccu_nk_find_best() 35 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_nk_find_best() 72 unsigned long rate, n, k; in ccu_nk_recalc_rate() local 89 rate = parent_rate * n * k; in ccu_nk_recalc_rate() 91 rate /= nk->fixed_post_div; in ccu_nk_recalc_rate() 93 return rate; in ccu_nk_recalc_rate() 96 static long ccu_nk_round_rate(struct clk_hw *hw, unsigned long rate, in ccu_nk_round_rate() argument 103 rate *= nk->fixed_post_div; in ccu_nk_round_rate() 110 ccu_nk_find_best(*parent_rate, rate, &_nk); in ccu_nk_round_rate() [all …]
|
/Linux-v4.19/drivers/net/wireless/intel/iwlwifi/mvm/ |
D | rs.c | 133 struct rs_rate *rate, 145 struct rs_rate *rate, in rs_ant_allow() argument 152 struct rs_rate *rate, in rs_mimo_allow() argument 174 struct rs_rate *rate, in rs_siso_allow() argument 184 struct rs_rate *rate, in rs_sgi_allow() argument 190 if (is_ht20(rate) && (ht_cap->cap & in rs_sgi_allow() 193 if (is_ht40(rate) && (ht_cap->cap & in rs_sgi_allow() 196 if (is_ht80(rate) && (vht_cap->cap & in rs_sgi_allow() 199 if (is_ht160(rate) && (vht_cap->cap & in rs_sgi_allow() 533 static char *rs_pretty_rate(const struct rs_rate *rate) in rs_pretty_rate() argument [all …]
|
D | rs.h | 206 #define is_legacy(rate) is_type_legacy((rate)->type) argument 207 #define is_ht_siso(rate) is_type_ht_siso((rate)->type) argument 208 #define is_ht_mimo2(rate) is_type_ht_mimo2((rate)->type) argument 209 #define is_vht_siso(rate) is_type_vht_siso((rate)->type) argument 210 #define is_vht_mimo2(rate) is_type_vht_mimo2((rate)->type) argument 211 #define is_siso(rate) is_type_siso((rate)->type) argument 212 #define is_mimo2(rate) is_type_mimo2((rate)->type) argument 213 #define is_mimo(rate) is_type_mimo((rate)->type) argument 214 #define is_ht(rate) is_type_ht((rate)->type) argument 215 #define is_vht(rate) is_type_vht((rate)->type) argument [all …]
|
/Linux-v4.19/drivers/staging/rtlwifi/rtl8822be/ |
D | phy.c | 233 u8 band, rfpath, txnum, rate; in _rtl8822be_phy_init_tx_power_by_rate() local 238 for (rate = 0; rate < TX_PWR_BY_RATE_NUM_RATE; in _rtl8822be_phy_init_tx_power_by_rate() 239 ++rate) in _rtl8822be_phy_init_tx_power_by_rate() 241 [band][rfpath][txnum][rate] = 0; in _rtl8822be_phy_init_tx_power_by_rate() 330 enum rtl_desc_rate rate; in _rtl8822be_phy_store_txpower_by_rate_base() member 342 u8 rate, section; in _rtl8822be_phy_store_txpower_by_rate_base() local 347 rate = rate_sec_base[rs].rate; in _rtl8822be_phy_store_txpower_by_rate_base() 350 if (IS_1T_RATE(rate)) in _rtl8822be_phy_store_txpower_by_rate_base() 356 RX_HAL_IS_CCK_RATE(rate)) in _rtl8822be_phy_store_txpower_by_rate_base() 360 [band][path][tx_num][rate]; in _rtl8822be_phy_store_txpower_by_rate_base() [all …]
|
/Linux-v4.19/drivers/clk/samsung/ |
D | clk-pll.c | 38 struct samsung_clk_pll *pll, unsigned long rate) in samsung_get_pll_settings() argument 44 if (rate == rate_table[i].rate) in samsung_get_pll_settings() 60 if (drate >= rate_table[i].rate) in samsung_pll_round_rate() 61 return rate_table[i].rate; in samsung_pll_round_rate() 65 return rate_table[i - 1].rate; in samsung_pll_round_rate() 196 const struct samsung_pll_rate_table *rate, u32 pll_con) in samsung_pll35xx_mp_change() argument 203 return (rate->mdiv != old_mdiv || rate->pdiv != old_pdiv); in samsung_pll35xx_mp_change() 210 const struct samsung_pll_rate_table *rate; in samsung_pll35xx_set_rate() local 214 rate = samsung_get_pll_settings(pll, drate); in samsung_pll35xx_set_rate() 215 if (!rate) { in samsung_pll35xx_set_rate() [all …]
|
/Linux-v4.19/arch/arm/mach-omap1/ |
D | clock.c | 57 return clk->parent->rate / div; in omap1_sossi_recalc() 135 static int calc_dsor_exp(struct clk *clk, unsigned long rate) in calc_dsor_exp() argument 156 realrate = parent->rate; in calc_dsor_exp() 158 if (realrate <= rate) in calc_dsor_exp() 172 return clk->parent->rate / dsor; in omap1_ckctl_recalc() 190 return clk->parent->rate / dsor; in omap1_ckctl_recalc_dsp_domain() 194 int omap1_select_table_rate(struct clk *clk, unsigned long rate) in omap1_select_table_rate() argument 200 ref_rate = ck_ref_p->rate; in omap1_select_table_rate() 202 for (ptr = omap1_rate_table; ptr->rate; ptr++) { in omap1_select_table_rate() 210 if (ptr->rate <= rate) in omap1_select_table_rate() [all …]
|
/Linux-v4.19/drivers/clk/qcom/ |
D | clk-rcg2.c | 133 calc_rate(unsigned long rate, u32 m, u32 n, u32 mode, u32 hid_div) in calc_rate() argument 136 rate *= 2; in calc_rate() 137 rate /= hid_div + 1; in calc_rate() 141 u64 tmp = rate; in calc_rate() 144 rate = tmp; in calc_rate() 147 return rate; in calc_rate() 181 unsigned long clk_flags, rate = req->rate; in _freq_tbl_determine_rate() local 188 f = qcom_find_freq_floor(f, rate); in _freq_tbl_determine_rate() 191 f = qcom_find_freq(f, rate); in _freq_tbl_determine_rate() 207 rate = f->freq; in _freq_tbl_determine_rate() [all …]
|
/Linux-v4.19/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 …]
|
D | owl-factor.c | 45 unsigned long rate, unsigned long parent_rate) in _get_table_val() argument 55 if ((unsigned long)calc_rate <= rate) { in _get_table_val() 67 static int clk_val_best(struct clk_hw *hw, unsigned long rate, in clk_val_best() argument 77 if (!rate) in clk_val_best() 78 rate = 1; in clk_val_best() 82 bestval = _get_table_val(clkt, rate, parent_rate); in clk_val_best() 87 try_parent_rate = rate * clkt->div / clkt->mul; in clk_val_best() 105 if (cur_rate <= rate && cur_rate > best) { in clk_val_best() 123 unsigned long rate, in owl_factor_helper_round_rate() argument 129 val = clk_val_best(&common->hw, rate, parent_rate); in owl_factor_helper_round_rate() [all …]
|
/Linux-v4.19/drivers/clk/ |
D | clk-multiplier.c | 18 unsigned long rate, in __get_mult() argument 22 return DIV_ROUND_CLOSEST(rate, parent_rate); in __get_mult() 24 return rate / parent_rate; in __get_mult() 42 static bool __is_best_rate(unsigned long rate, unsigned long new, in __is_best_rate() argument 46 return abs(rate - new) < abs(rate - best); in __is_best_rate() 48 return new >= rate && new < best; in __is_best_rate() 51 static unsigned long __bestmult(struct clk_hw *hw, unsigned long rate, in __bestmult() argument 62 bestmult = rate / orig_parent_rate; in __bestmult() 77 if (rate == orig_parent_rate * i) { in __bestmult() 88 rate / i); in __bestmult() [all …]
|
D | clk-cdce925.c | 108 static void cdce925_pll_find_rate(unsigned long rate, in cdce925_pll_find_rate() argument 115 if (rate <= parent_rate) { in cdce925_pll_find_rate() 117 rate = parent_rate; in cdce925_pll_find_rate() 122 if (rate < CDCE925_PLL_FREQUENCY_MIN) in cdce925_pll_find_rate() 123 rate = CDCE925_PLL_FREQUENCY_MIN; in cdce925_pll_find_rate() 124 else if (rate > CDCE925_PLL_FREQUENCY_MAX) in cdce925_pll_find_rate() 125 rate = CDCE925_PLL_FREQUENCY_MAX; in cdce925_pll_find_rate() 127 g = gcd(rate, parent_rate); in cdce925_pll_find_rate() 129 un = rate / g; in cdce925_pll_find_rate() 145 static long cdce925_pll_round_rate(struct clk_hw *hw, unsigned long rate, in cdce925_pll_round_rate() argument [all …]
|
/Linux-v4.19/drivers/clk/meson/ |
D | clk-pll.c | 48 u64 rate = (u64)parent_rate * pllt->m; in __pll_params_to_rate() local 54 rate += DIV_ROUND_UP_ULL(frac_rate, in __pll_params_to_rate() 58 return DIV_ROUND_UP_ULL(rate, pllt->n << od); in __pll_params_to_rate() 88 static u16 __pll_params_with_frac(unsigned long rate, in __pll_params_with_frac() argument 94 u64 val = (u64)rate * pllt->n; in __pll_params_with_frac() 109 meson_clk_get_pll_settings(unsigned long rate, in meson_clk_get_pll_settings() argument 119 while (table[i].rate && table[i].rate <= rate) in meson_clk_get_pll_settings() 125 (abs(rate - table[i - 1].rate) < in meson_clk_get_pll_settings() 126 abs(rate - table[i].rate))) in meson_clk_get_pll_settings() 133 static long meson_clk_pll_round_rate(struct clk_hw *hw, unsigned long rate, in meson_clk_pll_round_rate() argument [all …]
|
/Linux-v4.19/drivers/clk/imx/ |
D | clk-pllv3.c | 124 static long clk_pllv3_round_rate(struct clk_hw *hw, unsigned long rate, in clk_pllv3_round_rate() argument 129 return (rate >= parent_rate * 22) ? parent_rate * 22 : in clk_pllv3_round_rate() 133 static int clk_pllv3_set_rate(struct clk_hw *hw, unsigned long rate, in clk_pllv3_set_rate() argument 139 if (rate == parent_rate * 22) in clk_pllv3_set_rate() 141 else if (rate == parent_rate * 20) in clk_pllv3_set_rate() 172 static long clk_pllv3_sys_round_rate(struct clk_hw *hw, unsigned long rate, in clk_pllv3_sys_round_rate() argument 180 if (rate > max_rate) in clk_pllv3_sys_round_rate() 181 rate = max_rate; in clk_pllv3_sys_round_rate() 182 else if (rate < min_rate) in clk_pllv3_sys_round_rate() 183 rate = min_rate; in clk_pllv3_sys_round_rate() [all …]
|
/Linux-v4.19/arch/mips/lantiq/ |
D | clk.c | 34 cpu_clk_generic[0].rate = cpu; in clkdev_add_static() 35 cpu_clk_generic[1].rate = fpi; in clkdev_add_static() 36 cpu_clk_generic[2].rate = io; in clkdev_add_static() 37 cpu_clk_generic[3].rate = ppe; in clkdev_add_static() 72 if (clk->rate != 0) in clk_get_rate() 73 return clk->rate; in clk_get_rate() 82 int clk_set_rate(struct clk *clk, unsigned long rate) in clk_set_rate() argument 89 while (*r && (*r != rate)) in clk_set_rate() 93 clk->cl.dev_id, clk->cl.con_id, rate); in clk_set_rate() 97 clk->rate = rate; in clk_set_rate() [all …]
|
/Linux-v4.19/arch/sh/kernel/cpu/sh4/ |
D | clock-sh4-202.c | 28 return clk->parent->rate / frqcr3_divisors[idx]; in emi_clk_recalc() 31 static inline int frqcr3_lookup(struct clk *clk, unsigned long rate) in frqcr3_lookup() argument 33 int divisor = clk->parent->rate / rate; in frqcr3_lookup() 56 return clk->parent->rate / frqcr3_divisors[idx]; in femi_clk_recalc() 84 if (clk->ops->set_rate(clk, clk->parent->rate / divisor) == 0) in shoc_clk_init() 94 return clk->parent->rate / frqcr3_divisors[idx]; in shoc_clk_recalc() 97 static int shoc_clk_verify_rate(struct clk *clk, unsigned long rate) in shoc_clk_verify_rate() argument 104 if (rate > bclk_rate) in shoc_clk_verify_rate() 106 if (rate > 66000000) in shoc_clk_verify_rate() 112 static int shoc_clk_set_rate(struct clk *clk, unsigned long rate) in shoc_clk_set_rate() argument [all …]
|
/Linux-v4.19/arch/mips/ar7/ |
D | clock.c | 101 .rate = 125000000, 105 .rate = 150000000, 195 base_clock = cpu_clk.rate; in tnetd7300_get_clock() 222 int base_clock = bus_clk.rate; in tnetd7300_set_clock() 226 base_clock = bus_clk.rate; in tnetd7300_set_clock() 235 base_clock = cpu_clk.rate; in tnetd7300_set_clock() 257 bus_clk.rate = tnetd7300_get_clock(BUS_PLL_SOURCE_SHIFT, in tnetd7300_init_clocks() 261 cpu_clk.rate = tnetd7300_get_clock(CPU_PLL_SOURCE_SHIFT, in tnetd7300_init_clocks() 264 cpu_clk.rate = bus_clk.rate; in tnetd7300_init_clocks() 266 if (dsp_clk.rate == 250000000) in tnetd7300_init_clocks() [all …]
|
/Linux-v4.19/drivers/clk/zte/ |
D | clk.c | 28 static int rate_to_idx(struct clk_zx_pll *zx_pll, unsigned long rate) in rate_to_idx() argument 34 if (config[i].rate > rate) in rate_to_idx() 37 if (config[i].rate == rate) in rate_to_idx() 78 return zx_pll->lookup_table[idx].rate; in zx_pll_recalc_rate() 81 static long zx_pll_round_rate(struct clk_hw *hw, unsigned long rate, in zx_pll_round_rate() argument 87 idx = rate_to_idx(zx_pll, rate); in zx_pll_round_rate() 89 return zx_pll->lookup_table[idx].rate; in zx_pll_round_rate() 92 static int zx_pll_set_rate(struct clk_hw *hw, unsigned long rate, in zx_pll_set_rate() argument 100 idx = rate_to_idx(zx_pll, rate); in zx_pll_set_rate() 192 static u32 calc_reg(u32 parent_rate, u32 rate) in calc_reg() argument [all …]
|
/Linux-v4.19/drivers/net/wireless/mediatek/mt76/ |
D | mt76x2_mac_common.c | 72 stat->rate = FIELD_GET(MT_TX_STAT_FIFO_RATE, stat1); in mt76x2_mac_load_tx_status() 82 mt76x2_mac_process_tx_rate(struct ieee80211_tx_rate *txrate, u16 rate, in mt76x2_mac_process_tx_rate() argument 85 u8 idx = FIELD_GET(MT_RXWI_RATE_INDEX, rate); in mt76x2_mac_process_tx_rate() 91 switch (FIELD_GET(MT_RXWI_RATE_PHY, rate)) { in mt76x2_mac_process_tx_rate() 119 switch (FIELD_GET(MT_RXWI_RATE_BW, rate)) { in mt76x2_mac_process_tx_rate() 132 if (rate & MT_RXWI_RATE_SGI) in mt76x2_mac_process_tx_rate() 143 struct ieee80211_tx_rate *rate = info->status.rates; in mt76x2_mac_fill_tx_status() local 151 mt76x2_mac_process_tx_rate(&rate[last_rate], st->rate, in mt76x2_mac_fill_tx_status() 154 rate[last_rate + 1].idx = -1; in mt76x2_mac_fill_tx_status() 156 cur_idx = rate[last_rate].idx + last_rate; in mt76x2_mac_fill_tx_status() [all …]
|