/openbmc/linux/drivers/mmc/host/ |
H A D | sdhci-of-aspeed-test.c | 8 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 …]
|
/openbmc/linux/drivers/clk/rockchip/ |
H A 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 …]
|
/openbmc/linux/drivers/clk/ |
H A D | clk_test.c | 3 * Kunit test for clk rate management 19 unsigned long rate; member 28 return ctx->rate; in clk_dummy_recalc_rate() 34 /* Just return the same rate without modifying it */ in clk_dummy_determine_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() 110 * clk_round_rate() or clk_set_rate() with a rate lower than 114 * behaviour to always pick up the closest rate higher than the [all …]
|
/openbmc/linux/drivers/clk/sunxi-ng/ |
H A 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() 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 …]
|
H A D | ccu_mp.c | 13 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 58 * unsigned long in rate * m * p below in ccu_mp_find_best_with_parent_adj() 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() 73 * rate can be divided from parent clock without in ccu_mp_find_best_with_parent_adj() 74 * needing to change parent rate, so return the in ccu_mp_find_best_with_parent_adj() 78 return rate; in ccu_mp_find_best_with_parent_adj() [all …]
|
/openbmc/u-boot/drivers/clk/renesas/ |
H A D | clk-rcar-gen2.c | 82 u32 value, mult, div, rate = 0; in gen2_clk_get_rate() local 94 rate = gen2_clk_get_rate(&parent); in gen2_clk_get_rate() 95 debug("%s[%i] MOD clk: parent=%lu => rate=%u\n", in gen2_clk_get_rate() 96 __func__, __LINE__, parent.id, rate); in gen2_clk_get_rate() 97 return rate; in gen2_clk_get_rate() 107 rate = clk_get_rate(&priv->clk_extal); in gen2_clk_get_rate() 108 debug("%s[%i] EXTAL clk: rate=%u\n", in gen2_clk_get_rate() 109 __func__, __LINE__, rate); in gen2_clk_get_rate() 110 return rate; in gen2_clk_get_rate() 114 rate = clk_get_rate(&priv->clk_extal_usb); in gen2_clk_get_rate() [all …]
|
H A D | clk-rcar-gen3.c | 110 static int gen3_clk_setup_sdif_div(struct clk *clk, ulong rate) in gen3_clk_setup_sdif_div() argument 136 writel((rate == 400000000) ? 0x4 : 0x1, priv->base + core->offset); in gen3_clk_setup_sdif_div() 164 u64 rate = 0; in gen3_clk_get_rate64() local 176 rate = gen3_clk_get_rate64(&parent); in gen3_clk_get_rate64() 177 debug("%s[%i] MOD clk: parent=%lu => rate=%llu\n", in gen3_clk_get_rate64() 178 __func__, __LINE__, parent.id, rate); in gen3_clk_get_rate64() 179 return rate; in gen3_clk_get_rate64() 189 rate = clk_get_rate(&priv->clk_extal); in gen3_clk_get_rate64() 190 debug("%s[%i] EXTAL clk: rate=%llu\n", in gen3_clk_get_rate64() 191 __func__, __LINE__, rate); in gen3_clk_get_rate64() [all …]
|
/openbmc/linux/tools/testing/selftests/drivers/net/mlxsw/ |
H A D | devlink_trap_policer.sh | 144 devlink trap policer set $DEVLINK_DEV policer 1 rate 0 &> /dev/null 145 check_fail $? "Policer rate was changed to rate lower than limit" 147 rate 2000000001 &> /dev/null 148 check_fail $? "Policer rate was changed to rate higher than limit" 150 devlink trap policer set $DEVLINK_DEV policer 1 rate 1 151 check_err $? "Failed to set policer rate to minimum" 152 devlink trap policer set $DEVLINK_DEV policer 1 rate 2000000000 153 check_err $? "Failed to set policer rate to maximum" 155 log_test "Trap policer rate limits" 205 local rate pct drop_rate [all …]
|
/openbmc/linux/tools/testing/selftests/tc-testing/tc-tests/actions/ |
H A D | police.json | 17 "cmdUnderTest": "$TC actions add action police rate 1kbit burst 10k index 1", 20 "matchPattern": "action order [0-9]*: police 0x1 rate 1Kbit burst 10Kb", 40 "$TC actions add action police rate 4Mbit burst 120k index 9" 42 "cmdUnderTest": "$TC actions add action police rate 8kbit burst 24k index 9", 66 "cmdUnderTest": "$TC actions add action police rate 90kbit burst 10k mtu 1k index 98", 69 "matchPattern": "action order [0-9]*: police 0x62 rate 90Kbit burst 10Kb mtu 1Kb", 90 …"cmdUnderTest": "$TC actions add action police rate 90kbit burst 10k mtu 2kb peakrate 100kbit inde… 93 …"matchPattern": "action order [0-9]*: police 0x3 rate 90Kbit burst 10Kb mtu 2Kb peakrate 100Kbit", 114 … "cmdUnderTest": "$TC actions add action police rate 5kbit burst 6kb peakrate 10kbit index 9", 117 "matchPattern": "action order [0-9]*: police 0x9 rate 5Kb burst 10Kb", [all …]
|
H A D | sample.json | 17 "cmdUnderTest": "$TC actions add action sample rate 10 group 1 index 2", 20 "matchPattern": "action order [0-9]+: sample rate 1/10 group 1.*index 2 ref", 41 "cmdUnderTest": "$TC actions add action sample rate 700 group 2 continue index 2", 44 "matchPattern": "action order [0-9]+: sample rate 1/700 group 2 continue.*index 2 ref", 65 "cmdUnderTest": "$TC actions add action sample rate 10000 group 11 drop index 22", 68 "matchPattern": "action order [0-9]+: sample rate 1/10000 group 11 drop.*index 22 ref", 89 "cmdUnderTest": "$TC actions add action sample rate 20000 group 72 reclassify index 100", 92 … "matchPattern": "action order [0-9]+: sample rate 1/20000 group 72 reclassify.*index 100 ref", 113 "cmdUnderTest": "$TC actions add action sample rate 20 group 2 pipe index 100", 116 "matchPattern": "action order [0-9]+: sample rate 1/20 group 2 pipe.*index 100 ref", [all …]
|
/openbmc/linux/drivers/net/wireless/intel/iwlwifi/mvm/ |
H A D | rs.c | 72 * rate, ht rate, prev rate, next rate 74 * If there isn't a valid next or previous rate then INV is used which 116 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() [all …]
|
H A D | rs.h | 27 u8 prev_rs; /* previous rate used in rs algo */ 28 u8 next_rs; /* next rate used in rs algo */ 179 #define is_legacy(rate) is_type_legacy((rate)->type) argument 180 #define is_ht_siso(rate) is_type_ht_siso((rate)->type) argument 181 #define is_ht_mimo2(rate) is_type_ht_mimo2((rate)->type) argument 182 #define is_vht_siso(rate) is_type_vht_siso((rate)->type) argument 183 #define is_vht_mimo2(rate) is_type_vht_mimo2((rate)->type) argument 184 #define is_siso(rate) is_type_siso((rate)->type) argument 185 #define is_mimo2(rate) is_type_mimo2((rate)->type) argument 186 #define is_mimo(rate) is_type_mimo((rate)->type) argument [all …]
|
/openbmc/linux/drivers/clk/actions/ |
H A D | owl-composite.c | 60 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 …]
|
/openbmc/linux/drivers/clk/at91/ |
H A D | clk-audio-pll.c | 10 * (FRAC). FRAC can output between 620 and 700MHz and only multiply the rate of 11 * its own parent. PMC and PAD can then divide the FRAC rate to best match the 12 * asked rate. 16 * rate - rate is adjustable. 17 * clk->rate = parent->rate * ((nd + 1) + (fracr / 2^22)) 22 * rate - rate is adjustable. 23 * clk->rate = parent->rate / (qdpmc + 1) 28 * rate - rate is adjustable. 29 * clk->rate = parent->rate / (qdaudio * div)) 216 static int clk_audio_pll_frac_compute_frac(unsigned long rate, in clk_audio_pll_frac_compute_frac() argument [all …]
|
/openbmc/u-boot/arch/arm/mach-imx/mx7ulp/ |
H A D | scg.c | 54 u32 reg, val, rate; in scg_sircdiv_get_rate() local 84 rate = scg_src_get_rate(SCG_SIRC_CLK); in scg_sircdiv_get_rate() 85 rate = rate / (1 << (val - 1)); in scg_sircdiv_get_rate() 87 return rate; in scg_sircdiv_get_rate() 92 u32 reg, val, rate; in scg_fircdiv_get_rate() local 122 rate = scg_src_get_rate(SCG_FIRC_CLK); in scg_fircdiv_get_rate() 123 rate = rate / (1 << (val - 1)); in scg_fircdiv_get_rate() 125 return rate; in scg_fircdiv_get_rate() 130 u32 reg, val, rate; in scg_soscdiv_get_rate() local 160 rate = scg_src_get_rate(SCG_SOSC_CLK); in scg_soscdiv_get_rate() [all …]
|
/openbmc/linux/drivers/clk/samsung/ |
H A D | clk-pll.c | 39 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 255 /* Get required rate settings from table */ in samsung_pll35xx_set_rate() 256 rate = samsung_get_pll_settings(pll, drate); in samsung_pll35xx_set_rate() [all …]
|
/openbmc/linux/drivers/clk/ti/ |
H A D | dpll44xx.c | 34 /* Static rate multiplier for OMAP4 REGM4XEN clocks */ 104 * omap4_dpll_regm4xen_recalc - compute DPLL rate, considering REGM4XEN bit 105 * @hw: pointer to the clock to compute the rate for 106 * @parent_rate: clock rate of the DPLL parent 108 * Compute the output rate for the OMAP4 DPLL represented by @clk. 110 * OMAP4 ABE DPLL. Returns the DPLL's output rate (before M-dividers) 118 unsigned long rate; in omap4_dpll_regm4xen_recalc() local 126 rate = omap2_get_dpll_rate(clk); in omap4_dpll_regm4xen_recalc() 131 rate *= OMAP4430_REGM4XEN_MULT; in omap4_dpll_regm4xen_recalc() 133 return rate; in omap4_dpll_regm4xen_recalc() [all …]
|
/openbmc/linux/drivers/clk/imx/ |
H A D | clk-pll14xx.c | 92 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 123 /* calc kdiv = round(rate * pdiv * 65536 * 2^sdiv / prate) - (mdiv * 65536) */ in pll1443x_calc_kdiv() 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 148 /* First try if we can get the desired rate from one of the static entries */ in imx_pll14xx_calc_settings() 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() [all …]
|
H A D | clk-scu.c | 56 u32 rate; member 76 * struct imx_sc_msg_req_set_clock_rate - clock set rate protocol 78 * @rate: rate to set 79 * @resource: clock resource to set rate 82 * This structure describes the SCU protocol of clock rate set 86 __le32 rate; member 97 __le32 rate; member 101 * struct imx_sc_msg_get_clock_rate - clock get rate protocol 103 * @req: get rate request protocol 104 * @resp: get rate response protocol [all …]
|
/openbmc/linux/drivers/staging/rtl8723bs/include/ |
H A D | hal_com.h | 21 /* Rate */ 49 #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" : \ [all …]
|
/openbmc/linux/sound/soc/mediatek/mt8186/ |
H A D | mt8186-afe-control.c | 75 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() 111 dev_err(dev, "%s(), rate %u invalid, use %d!!!\n", 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() 158 dev_err(dev, "%s(), rate %u invalid, use %d!!!\n", 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() [all …]
|
/openbmc/linux/drivers/net/wireless/realtek/rtw88/ |
H A D | phy.c | 1145 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 …]
|
/openbmc/linux/net/wireless/ |
H A D | util.c | 1219 static u32 cfg80211_calculate_bitrate_ht(struct rate_info *rate) in cfg80211_calculate_bitrate_ht() argument 1224 if (WARN_ON_ONCE(rate->mcs >= 32)) in cfg80211_calculate_bitrate_ht() 1227 modulation = rate->mcs & 7; in cfg80211_calculate_bitrate_ht() 1228 streams = (rate->mcs >> 3) + 1; in cfg80211_calculate_bitrate_ht() 1230 bitrate = (rate->bw == RATE_INFO_BW_40) ? 13500000 : 6500000; in cfg80211_calculate_bitrate_ht() 1241 if (rate->flags & RATE_INFO_FLAGS_SHORT_GI) in cfg80211_calculate_bitrate_ht() 1248 static u32 cfg80211_calculate_bitrate_dmg(struct rate_info *rate) in cfg80211_calculate_bitrate_dmg() argument 1289 if (WARN_ON_ONCE(rate->mcs >= ARRAY_SIZE(__mcs2bitrate))) in cfg80211_calculate_bitrate_dmg() 1292 return __mcs2bitrate[rate->mcs]; in cfg80211_calculate_bitrate_dmg() 1295 static u32 cfg80211_calculate_bitrate_extended_sc_dmg(struct rate_info *rate) in cfg80211_calculate_bitrate_extended_sc_dmg() argument [all …]
|
/openbmc/linux/drivers/clk/zynqmp/ |
H A D | divider.c | 21 * rate - rate is adjustable. clk->rate = ceiling(parent->rate / divisor) 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() 73 * zynqmp_clk_divider_recalc_rate() - Recalc rate of divider clock 75 * @parent_rate: rate of parent clock 114 * zynqmp_clk_divider_round_rate() - Round rate of divider clock 116 * @rate: rate of clock to be set [all …]
|
/openbmc/linux/drivers/net/wireless/realtek/rtlwifi/ |
H A D | rc.c | 9 *Finds the highest rate index we can use 11 *it to lowest rate CCK_1M, otherwise we set rate to 12 *highest rate based on wireless mode used for iwconfig 13 *show Tx rate. 24 struct ieee80211_tx_rate rate; in _rtl_rc_get_highest_rix() local 42 *this rate is no use for true rate, firmware in _rtl_rc_get_highest_rix() 43 *will control rate at all it just used for in _rtl_rc_get_highest_rix() 45 *2.in rtl_get_tcb_desc when we check rate is in _rtl_rc_get_highest_rix() 46 * 1M we will not use FW rate but user rate. in _rtl_rc_get_highest_rix() 70 ieee80211_rate_set_vht(&rate, in _rtl_rc_get_highest_rix() [all …]
|