/openbmc/linux/drivers/net/wireless/realtek/rtlwifi/ |
H A D | rc.c | 24 struct ieee80211_tx_rate rate; in _rtl_rc_get_highest_rix() local 70 ieee80211_rate_set_vht(&rate, in _rtl_rc_get_highest_rix() 75 ieee80211_rate_set_vht(&rate, in _rtl_rc_get_highest_rix() 92 ieee80211_rate_set_vht(&rate, in _rtl_rc_get_highest_rix() 97 ieee80211_rate_set_vht(&rate, in _rtl_rc_get_highest_rix() 108 return rate.idx; in _rtl_rc_get_highest_rix() 113 struct ieee80211_tx_rate *rate, in _rtl_rc_rate_set_series() argument 130 rate->count = tries; in _rtl_rc_rate_set_series() 131 rate->idx = rix >= 0x00 ? rix : 0x00; in _rtl_rc_rate_set_series() 155 rate->flags |= IEEE80211_TX_RC_MCS; in _rtl_rc_rate_set_series() [all …]
|
/openbmc/u-boot/drivers/clk/rockchip/ |
H A D | clk_rk3368.c | 159 u32 div, con, con_id, rate; in rk3368_mmc_get_clk() local 192 rate = DIV_TO_RATE(pll_rate, div); in rk3368_mmc_get_clk() 195 return rate >> 1; in rk3368_mmc_get_clk() 199 ulong rate, in rk3368_mmc_find_best_rate_and_parent() argument 208 ulong rate; in rk3368_mmc_find_best_rate_and_parent() member 221 ulong parent_rate = parents[i].rate; in rk3368_mmc_find_best_rate_and_parent() 227 __func__, rate, parents[i].mux, parents[i].rate, div); in rk3368_mmc_find_best_rate_and_parent() 455 ulong rate = 0; in rk3368_clk_get_rate() local 475 rate = rk3368_saradc_get_clk(priv->cru); in rk3368_clk_get_rate() 481 return rate; in rk3368_clk_get_rate() [all …]
|
/openbmc/linux/drivers/clk/at91/ |
H A D | clk-smd.c | 46 if (req->rate >= req->best_parent_rate) { in at91sam9x5_clk_smd_determine_rate() 47 req->rate = req->best_parent_rate; in at91sam9x5_clk_smd_determine_rate() 51 div = req->best_parent_rate / req->rate; in at91sam9x5_clk_smd_determine_rate() 53 req->rate = req->best_parent_rate / (SMD_MAX_DIV + 1); in at91sam9x5_clk_smd_determine_rate() 59 if (bestrate - req->rate > req->rate - tmp) in at91sam9x5_clk_smd_determine_rate() 62 req->rate = bestrate; in at91sam9x5_clk_smd_determine_rate() 89 static int at91sam9x5_clk_smd_set_rate(struct clk_hw *hw, unsigned long rate, in at91sam9x5_clk_smd_set_rate() argument 93 unsigned long div = parent_rate / rate; in at91sam9x5_clk_smd_set_rate() 95 if (parent_rate % rate || div < 1 || div > (SMD_MAX_DIV + 1)) in at91sam9x5_clk_smd_set_rate()
|
/openbmc/linux/sound/firewire/motu/ |
H A D | motu.h | 187 unsigned int *rate); 189 unsigned int rate); 197 unsigned int *rate); 199 unsigned int rate); 207 unsigned int *rate); 209 unsigned int rate); 217 unsigned int *rate) in snd_motu_protocol_get_clock_rate() argument 220 return snd_motu_protocol_v2_get_clock_rate(motu, rate); in snd_motu_protocol_get_clock_rate() 222 return snd_motu_protocol_v3_get_clock_rate(motu, rate); in snd_motu_protocol_get_clock_rate() 224 return snd_motu_protocol_v1_get_clock_rate(motu, rate); in snd_motu_protocol_get_clock_rate() [all …]
|
/openbmc/linux/drivers/net/wireless/marvell/mwifiex/ |
H A D | cfp.c | 187 u32 rate = 0; in mwifiex_index_to_acs_data_rate() local 221 rate = mwifiex_data_rates[0]; in mwifiex_index_to_acs_data_rate() 223 rate = mwifiex_data_rates[0]; in mwifiex_index_to_acs_data_rate() 232 return rate; in mwifiex_index_to_acs_data_rate() 243 u32 rate; in mwifiex_index_to_data_rate() local 258 rate = mcs_rate[1][index]; in mwifiex_index_to_data_rate() 261 rate = mcs_rate[0][index]; in mwifiex_index_to_data_rate() 265 rate = mcs_rate[3][index]; in mwifiex_index_to_data_rate() 268 rate = mcs_rate[2][index]; in mwifiex_index_to_data_rate() 271 rate = mwifiex_data_rates[0]; in mwifiex_index_to_data_rate() [all …]
|
/openbmc/linux/drivers/gpu/drm/sun4i/ |
H A D | sun8i_hdmi_phy_clk.c | 23 unsigned long rate = req->rate; in sun8i_phy_clk_determine_rate() local 36 unsigned long ideal = rate * i; in sun8i_phy_clk_determine_rate() 49 abs(rate - rounded / i) < in sun8i_phy_clk_determine_rate() 50 abs(rate - best_rate / best_div)) { in sun8i_phy_clk_determine_rate() 57 if (best_rate / best_div == rate) in sun8i_phy_clk_determine_rate() 61 req->rate = best_rate / best_div; in sun8i_phy_clk_determine_rate() 81 static int sun8i_phy_clk_set_rate(struct clk_hw *hw, unsigned long rate, in sun8i_phy_clk_set_rate() argument 91 if (tmp_rate > rate) in sun8i_phy_clk_set_rate() 95 (rate - tmp_rate) < (rate - best_rate)) { in sun8i_phy_clk_set_rate()
|
/openbmc/linux/drivers/clk/tegra/ |
H A D | clk-audio-sync.c | 17 return sync->rate; in clk_sync_source_recalc_rate() 20 static long clk_sync_source_round_rate(struct clk_hw *hw, unsigned long rate, in clk_sync_source_round_rate() argument 25 if (rate > sync->max_rate) in clk_sync_source_round_rate() 28 return rate; in clk_sync_source_round_rate() 31 static int clk_sync_source_set_rate(struct clk_hw *hw, unsigned long rate, in clk_sync_source_set_rate() argument 36 sync->rate = rate; in clk_sync_source_set_rate()
|
H A D | clk-tegra210-emc.c | 100 if (provider->configs[i].rate >= rate) in tegra210_clk_emc_round_rate() 101 return provider->configs[i].rate; in tegra210_clk_emc_round_rate() 104 return provider->configs[i - 1].rate; in tegra210_clk_emc_round_rate() 135 if (provider->configs[i].rate >= rate) { in tegra210_clk_emc_set_rate() 228 dev_err(dev, "failed to set EMC rate to %lu Hz: %d\n", rate, in tegra210_clk_emc_set_rate() 319 div, config->rate); in tegra210_clk_emc_attach() 329 config->rate); in tegra210_clk_emc_attach() 338 config->parent_rate = config->rate * (1 + div / 2); in tegra210_clk_emc_attach() 340 unsigned long rate = config->rate * (1 + div / 2); in tegra210_clk_emc_attach() local 344 if (config->parent_rate != rate) { in tegra210_clk_emc_attach() [all …]
|
/openbmc/linux/samples/bpf/ |
H A D | do_hbm_test.sh | 82 rate=1000 171 -r=*|--rate=*) 172 rate="${i#*=}" 310 rate=0 327 rate=$[rate+r] 339 echo "AGGREGATE_GOODPUT:$rate" 341 echo $rate 362 echo $rate 375 rate=0 392 rate=$[rate+r] [all …]
|
/openbmc/linux/drivers/clk/bcm/ |
H A D | clk-iproc-pll.c | 311 unsigned long rate = vco->rate; in pll_set_rate() local 327 if (rate >= VCO_LOW && rate < VCO_HIGH) { in pll_set_rate() 330 } else if (rate >= VCO_HIGH && rate < VCO_HIGH_HIGH) { in pll_set_rate() 333 } else if (rate >= VCO_HIGH_HIGH && rate < VCO_MAX) { in pll_set_rate() 384 if (rate >= VCO_LOW && rate < VCO_MID) in pll_set_rate() 489 rate *= 2; in iproc_pll_recalc_rate() 493 return rate; in iproc_pll_recalc_rate() 518 req->rate = vco_param.rate; in iproc_pll_determine_rate() 527 diff = abs(req->rate - pll->vco_param[i].rate); in iproc_pll_determine_rate() 537 req->rate = pll->vco_param[best_idx].rate; in iproc_pll_determine_rate() [all …]
|
/openbmc/linux/drivers/clk/qcom/ |
H A D | clk-rcg.c | 329 rate /= pre_div + 1; in calc_rate() 332 u64 tmp = rate; in calc_rate() 335 rate = tmp; in calc_rate() 338 return rate; in calc_rate() 403 unsigned long clk_flags, rate = req->rate; in _freq_tbl_determine_rate() local 418 rate = rate * f->pre_div; in _freq_tbl_determine_rate() 420 u64 tmp = rate; in _freq_tbl_determine_rate() 423 rate = tmp; in _freq_tbl_determine_rate() 430 req->rate = f->freq; in _freq_tbl_determine_rate() 688 if (req->rate == 0) in clk_rcg_esc_determine_rate() [all …]
|
/openbmc/linux/drivers/gpu/drm/msm/disp/mdp4/ |
H A D | mdp4_lvds_pll.c | 26 unsigned long rate; member 48 static const struct pll_rate *find_rate(unsigned long rate) in find_rate() argument 52 if (rate > freqtbl[i].rate) in find_rate() 64 DBG("pixclk=%lu (%lu)", lvds_pll->pixclk, pll_rate->rate); in mpd4_lvds_pll_enable() 101 static long mpd4_lvds_pll_round_rate(struct clk_hw *hw, unsigned long rate, in mpd4_lvds_pll_round_rate() argument 104 const struct pll_rate *pll_rate = find_rate(rate); in mpd4_lvds_pll_round_rate() 105 return pll_rate->rate; in mpd4_lvds_pll_round_rate() 108 static int mpd4_lvds_pll_set_rate(struct clk_hw *hw, unsigned long rate, in mpd4_lvds_pll_set_rate() argument 112 lvds_pll->pixclk = rate; in mpd4_lvds_pll_set_rate()
|
/openbmc/u-boot/drivers/adc/ |
H A D | stm32-adc-core.c | 62 unsigned long rate; in stm32h7_adc_clk_sel() local 81 rate = clk_get_rate(&common->aclk); in stm32h7_adc_clk_sel() 82 if (!rate) { in stm32h7_adc_clk_sel() 95 if ((rate / div) <= STM32H7_ADC_MAX_CLK_RATE) in stm32h7_adc_clk_sel() 101 rate = clk_get_rate(&common->bclk); in stm32h7_adc_clk_sel() 102 if (!rate) { in stm32h7_adc_clk_sel() 115 if ((rate / div) <= STM32H7_ADC_MAX_CLK_RATE) in stm32h7_adc_clk_sel() 124 common->rate = rate / div; in stm32h7_adc_clk_sel() 133 ckmode ? "bus" : "adc", div, common->rate / 1000); in stm32h7_adc_clk_sel()
|
/openbmc/linux/drivers/clk/ |
H A D | clk-composite.c | 50 long rate; in clk_composite_determine_rate_for_parent() local 58 rate = rate_ops->round_rate(rate_hw, req->rate, in clk_composite_determine_rate_for_parent() 60 if (rate < 0) in clk_composite_determine_rate_for_parent() 61 return rate; in clk_composite_determine_rate_for_parent() 63 req->rate = rate; in clk_composite_determine_rate_for_parent() 100 req->rate = tmp_req.rate; in clk_composite_determine_rate() 122 if (req->rate >= tmp_req.rate) in clk_composite_determine_rate() 123 rate_diff = req->rate - tmp_req.rate; in clk_composite_determine_rate() 125 rate_diff = tmp_req.rate - req->rate; in clk_composite_determine_rate() 139 req->rate = best_rate; in clk_composite_determine_rate() [all …]
|
/openbmc/u-boot/drivers/clk/ |
H A D | clk_sandbox.c | 13 ulong rate[SANDBOX_CLK_ID_COUNT]; member 24 return priv->rate[clk->id]; in sandbox_clk_get_rate() 27 static ulong sandbox_clk_set_rate(struct clk *clk, ulong rate) in sandbox_clk_set_rate() argument 35 if (!rate) in sandbox_clk_set_rate() 38 old_rate = priv->rate[clk->id]; in sandbox_clk_set_rate() 39 priv->rate[clk->id] = rate; in sandbox_clk_set_rate() 95 return priv->rate[id]; in sandbox_clk_query_rate()
|
/openbmc/linux/sound/usb/ |
H A D | format.c | 166 fp->rate_min = rate; in set_fixed_rate() 167 fp->rate_max = rate; in set_fixed_rate() 176 unsigned int rate; in set_rate_table_min_max() local 226 if (!rate) in parse_audio_format_rates_v1() 237 rate = 96000; in parse_audio_format_rates_v1() 239 if (rate == 16000 && in parse_audio_format_rates_v1() 242 rate = 8000; in parse_audio_format_rates_v1() 287 return rate <= 48000; in s1810c_valid_sample_rate() 290 return (rate == 88200 || rate == 96000); in s1810c_valid_sample_rate() 362 unsigned int rate; in parse_uac2_sample_rate_range() local [all …]
|
/openbmc/linux/net/mac80211/ |
H A D | rc80211_minstrel_ht.c | 377 idx = rate->idx % 8; in minstrel_ht_get_stats() 424 idx = rate->mcs % 8; in minstrel_ht_ri_get_stats() 430 idx = rate->mcs; in minstrel_ht_ri_get_stats() 1202 if (rate->idx < 0) in minstrel_ht_txstat_valid() 1205 if (!rate->count) in minstrel_ht_txstat_valid() 1358 if (rate->attempts > 30 && in minstrel_ht_tx_status() 1359 rate->success < rate->attempts / 4) { in minstrel_ht_tx_status() 1484 ratetbl->rate[offset].count = ratetbl->rate[offset].count_rts; in minstrel_ht_set_rate() 1496 rate = MI_RATE_IDX(rate); in minstrel_ht_get_prob_avg() 1571 rates->rate[i].idx = -1; in minstrel_ht_update_rates() [all …]
|
/openbmc/linux/sound/soc/ |
H A D | soc-utils-test.c | 13 u32 rate; member 119 unsigned int rate, snd_pcm_format_t fmt, in test_tdm_params_to_bclk_one() argument 130 hw_param_interval(¶ms, SNDRV_PCM_HW_PARAM_RATE)->min = rate; in test_tdm_params_to_bclk_one() 131 hw_param_interval(¶ms, SNDRV_PCM_HW_PARAM_RATE)->max = rate; in test_tdm_params_to_bclk_one() 150 tdm_params_to_bclk_cases[i].rate, in test_tdm_params_to_bclk() 163 tdm_params_to_bclk_cases[i].rate, in test_tdm_params_to_bclk() 174 unsigned int rate, snd_pcm_format_t fmt, in test_snd_soc_params_to_bclk_one() argument 183 hw_param_interval(¶ms, SNDRV_PCM_HW_PARAM_RATE)->min = rate; in test_snd_soc_params_to_bclk_one() 184 hw_param_interval(¶ms, SNDRV_PCM_HW_PARAM_RATE)->max = rate; in test_snd_soc_params_to_bclk_one() 192 rate, params_width(¶ms), channels, expected_bclk, got_bclk); in test_snd_soc_params_to_bclk_one() [all …]
|
/openbmc/linux/drivers/clocksource/ |
H A D | timer-stm32-lp.c | 109 unsigned long *rate) in stm32_clkevent_lp_set_prescaler() argument 114 if (DIV_ROUND_CLOSEST(*rate, 1 << i) < STM32_TARGET_CLKRATE) in stm32_clkevent_lp_set_prescaler() 121 *rate = DIV_ROUND_CLOSEST(*rate, (1 << i)); in stm32_clkevent_lp_set_prescaler() 122 priv->period = DIV_ROUND_UP(*rate, HZ); in stm32_clkevent_lp_set_prescaler() 126 struct device_node *np, unsigned long rate) in stm32_clkevent_lp_init() argument 138 clockevents_config_and_register(&priv->clkevt, rate, 0x1, in stm32_clkevent_lp_init() 146 unsigned long rate; in stm32_clkevent_lp_probe() local 158 rate = clk_get_rate(ddata->clk); in stm32_clkevent_lp_probe() 159 if (!rate) { in stm32_clkevent_lp_probe() 185 stm32_clkevent_lp_set_prescaler(priv, &rate); in stm32_clkevent_lp_probe() [all …]
|
/openbmc/linux/drivers/clk/actions/ |
H A D | owl-divider.c | 18 unsigned long rate, in owl_divider_helper_round_rate() argument 21 return divider_round_rate(&common->hw, rate, parent_rate, in owl_divider_helper_round_rate() 26 static long owl_divider_round_rate(struct clk_hw *hw, unsigned long rate, in owl_divider_round_rate() argument 32 rate, parent_rate); in owl_divider_round_rate() 63 unsigned long rate, in owl_divider_helper_set_rate() argument 69 val = divider_get_val(rate, parent_rate, div_hw->table, in owl_divider_helper_set_rate() 81 static int owl_divider_set_rate(struct clk_hw *hw, unsigned long rate, in owl_divider_set_rate() argument 87 rate, parent_rate); in owl_divider_set_rate()
|
/openbmc/linux/drivers/clk/zynqmp/ |
H A D | divider.c | 50 unsigned long rate, u16 flags) in zynqmp_divider_get_val() argument 56 up = DIV_ROUND_UP_ULL((u64)parent_rate, rate); in zynqmp_divider_get_val() 57 down = DIV_ROUND_DOWN_ULL((u64)parent_rate, rate); in zynqmp_divider_get_val() 65 return (rate - up_rate) <= (down_rate - rate) ? up : down; in zynqmp_divider_get_val() 68 return DIV_ROUND_CLOSEST(parent_rate, rate); in zynqmp_divider_get_val() 122 unsigned long rate, in zynqmp_clk_divider_round_rate() argument 153 rate = divider_round_rate(hw, rate, prate, NULL, width, divider->flags); in zynqmp_clk_divider_round_rate() 156 *prate = rate; in zynqmp_clk_divider_round_rate() 158 return rate; in zynqmp_clk_divider_round_rate() 169 static int zynqmp_clk_divider_set_rate(struct clk_hw *hw, unsigned long rate, in zynqmp_clk_divider_set_rate() argument [all …]
|
/openbmc/linux/drivers/net/wireless/realtek/rtw88/ |
H A D | rx.c | 51 dm_info->curr_rx_rate = pkt_stat->rate; in rtw_rx_phy_stat() 56 switch (pkt_stat->rate) { in rtw_rx_phy_stat() 93 cur_pkt_cnt->num_qry_pkt[pkt_stat->rate]++; in rtw_rx_phy_stat() 169 if (pkt_stat->rate >= DESC_RATEVHT1SS_MCS0) in rtw_rx_fill_rx_status() 171 else if (pkt_stat->rate >= DESC_RATEMCS0) in rtw_rx_fill_rx_status() 175 pkt_stat->rate >= DESC_RATE6M && in rtw_rx_fill_rx_status() 176 pkt_stat->rate <= DESC_RATE54M) { in rtw_rx_fill_rx_status() 177 rx_status->rate_idx = pkt_stat->rate - DESC_RATE6M; in rtw_rx_fill_rx_status() 179 pkt_stat->rate >= DESC_RATE1M && in rtw_rx_fill_rx_status() 180 pkt_stat->rate <= DESC_RATE54M) { in rtw_rx_fill_rx_status() [all …]
|
/openbmc/u-boot/arch/arm/mach-omap2/ |
H A D | pipe3-phy.c | 69 u32 rate; in omap_pipe3_get_dpll_params() local 72 rate = get_sys_clk_freq(); in omap_pipe3_get_dpll_params() 74 for (; dpll_map->rate; dpll_map++) { in omap_pipe3_get_dpll_params() 75 if (rate == dpll_map->rate) in omap_pipe3_get_dpll_params() 80 __func__, rate); in omap_pipe3_get_dpll_params() 148 u32 val, rate; in omap_control_phy_power() local 152 rate = get_sys_clk_freq(); in omap_control_phy_power() 153 rate = rate/1000000; in omap_control_phy_power() 160 val |= rate << in omap_control_phy_power()
|
/openbmc/linux/sound/soc/qcom/qdsp6/ |
H A D | q6dsp-lpass-clocks.c | 24 int rate; member 43 Q6DSP_LPASS_CLK_ROOT_DEFAULT, clk->rate); in clk_q6dsp_prepare() 55 static int clk_q6dsp_set_rate(struct clk_hw *hw, unsigned long rate, in clk_q6dsp_set_rate() argument 60 clk->rate = rate; in clk_q6dsp_set_rate() 70 return clk->rate; in clk_q6dsp_recalc_rate() 73 static long clk_q6dsp_round_rate(struct clk_hw *hw, unsigned long rate, in clk_q6dsp_round_rate() argument 76 return rate; in clk_q6dsp_round_rate() 163 clk->rate = q6dsp_clks[i].rate; in q6dsp_clock_dev_probe() 166 if (clk->rate) in q6dsp_clock_dev_probe()
|
/openbmc/linux/drivers/clk/axs10x/ |
H A D | i2s_pll_clock.c | 25 unsigned int rate; member 111 static long i2s_pll_round_rate(struct clk_hw *hw, unsigned long rate, in i2s_pll_round_rate() argument 123 for (i = 0; pll_cfg[i].rate != 0; i++) in i2s_pll_round_rate() 124 if (pll_cfg[i].rate == rate) in i2s_pll_round_rate() 125 return rate; in i2s_pll_round_rate() 130 static int i2s_pll_set_rate(struct clk_hw *hw, unsigned long rate, in i2s_pll_set_rate() argument 142 for (i = 0; pll_cfg[i].rate != 0; i++) { in i2s_pll_set_rate() 143 if (pll_cfg[i].rate == rate) { in i2s_pll_set_rate() 152 dev_err(clk->dev, "invalid rate=%ld, parent_rate=%ld\n", rate, in i2s_pll_set_rate()
|