/kernel/linux/linux-5.10/drivers/clk/sunxi/ |
H A D | clk-sun9i-core.c | 19 * PLL4 rate is calculated as follows 20 * rate = (parent_rate * n >> p) / (m + 1); 33 n = DIV_ROUND_UP(req->rate, 6000000); in sun9i_a80_get_pll4_factors() 53 req->rate = ((24000000 * n) >> p) / (m + 1); in sun9i_a80_get_pll4_factors() 95 * GT rate is calculated as follows 96 * rate = parent_rate / (m + 1); 103 if (req->parent_rate < req->rate) in sun9i_a80_get_gt_factors() 104 req->rate = req->parent_rate; in sun9i_a80_get_gt_factors() 106 div = DIV_ROUND_UP(req->parent_rate, req->rate); in sun9i_a80_get_gt_factors() 112 req->rate in sun9i_a80_get_gt_factors() [all...] |
/kernel/linux/linux-5.10/samples/bpf/ |
H A D | hbm_kern.h | 57 // rate in bytes per ns << 20 58 #define CREDIT_PER_NS(delta, rate) ((((u64)(delta)) * (rate)) >> 20) 59 #define BYTES_PER_NS(delta, rate) ((((u64)(delta)) * (rate)) >> 20) 60 #define BYTES_TO_NS(bytes, rate) div64_u64(((u64)(bytes)) << 20, (u64)(rate)) 137 static __always_inline void hbm_init_vqueue(struct hbm_vqueue *qdp, int rate) in hbm_init_vqueue() argument 139 bpf_printk("Initializing queue_state, rate:%d\n", rate * 12 in hbm_init_vqueue() 145 hbm_init_edt_vqueue(struct hbm_vqueue *qdp, int rate) hbm_init_edt_vqueue() argument [all...] |
/kernel/linux/linux-5.10/drivers/net/wireless/realtek/rtw88/ |
H A D | rx.c | 50 dm_info->curr_rx_rate = pkt_stat->rate; in rtw_rx_phy_stat() 55 switch (pkt_stat->rate) { in rtw_rx_phy_stat() 76 rtw_warn(rtwdev, "unknown pkt rate = %d\n", pkt_stat->rate); in rtw_rx_phy_stat() 92 cur_pkt_cnt->num_qry_pkt[pkt_stat->rate]++; in rtw_rx_phy_stat() 158 if (pkt_stat->rate >= DESC_RATEVHT1SS_MCS0) in rtw_rx_fill_rx_status() 160 else if (pkt_stat->rate >= DESC_RATEMCS0) in rtw_rx_fill_rx_status() 164 pkt_stat->rate >= DESC_RATE6M && in rtw_rx_fill_rx_status() 165 pkt_stat->rate <= DESC_RATE54M) { in rtw_rx_fill_rx_status() 166 rx_status->rate_idx = pkt_stat->rate in rtw_rx_fill_rx_status() [all...] |
/kernel/linux/linux-6.6/drivers/clk/sunxi/ |
H A D | clk-sun9i-core.c | 19 * PLL4 rate is calculated as follows 20 * rate = (parent_rate * n >> p) / (m + 1); 33 n = DIV_ROUND_UP(req->rate, 6000000); in sun9i_a80_get_pll4_factors() 53 req->rate = ((24000000 * n) >> p) / (m + 1); in sun9i_a80_get_pll4_factors() 95 * GT rate is calculated as follows 96 * rate = parent_rate / (m + 1); 103 if (req->parent_rate < req->rate) in sun9i_a80_get_gt_factors() 104 req->rate = req->parent_rate; in sun9i_a80_get_gt_factors() 106 div = DIV_ROUND_UP(req->parent_rate, req->rate); in sun9i_a80_get_gt_factors() 112 req->rate in sun9i_a80_get_gt_factors() [all...] |
/kernel/linux/linux-6.6/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() 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() 49 zynqmp_divider_get_val(unsigned long parent_rate, unsigned long rate, u16 flags) zynqmp_divider_get_val() argument 121 zynqmp_clk_divider_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *prate) zynqmp_clk_divider_round_rate() argument 169 zynqmp_clk_divider_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) zynqmp_clk_divider_set_rate() argument [all...] |
/kernel/linux/linux-6.6/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() 77 rtw_warn(rtwdev, "unknown pkt rate = %d\n", 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 in rtw_rx_fill_rx_status() [all...] |
/kernel/linux/linux-6.6/samples/bpf/ |
H A D | hbm_kern.h | 55 // rate in bytes per ns << 20 56 #define CREDIT_PER_NS(delta, rate) ((((u64)(delta)) * (rate)) >> 20) 57 #define BYTES_PER_NS(delta, rate) ((((u64)(delta)) * (rate)) >> 20) 58 #define BYTES_TO_NS(bytes, rate) div64_u64(((u64)(bytes)) << 20, (u64)(rate)) 135 static __always_inline void hbm_init_vqueue(struct hbm_vqueue *qdp, int rate) in hbm_init_vqueue() argument 137 bpf_printk("Initializing queue_state, rate:%d\n", rate * 12 in hbm_init_vqueue() 143 hbm_init_edt_vqueue(struct hbm_vqueue *qdp, int rate) hbm_init_edt_vqueue() argument [all...] |
/kernel/linux/linux-6.6/sound/soc/mediatek/mt8188/ |
H A D | mt8188-dai-pcm.c | 33 unsigned int rate; member 45 { .rate = 8000, .reg_value = 0, }, 46 { .rate = 16000, .reg_value = 1, }, 47 { .rate = 32000, .reg_value = 2, }, 48 { .rate = 48000, .reg_value = 3, }, 49 { .rate = 11025, .reg_value = 1, }, 50 { .rate = 22050, .reg_value = 2, }, 51 { .rate = 44100, .reg_value = 3, }, 54 static int mtk_dai_pcm_mode(unsigned int rate) in mtk_dai_pcm_mode() argument 59 if (mtk_dai_pcm_rates[i].rate in mtk_dai_pcm_mode() [all...] |
/kernel/linux/linux-6.6/net/mac80211/ |
H A D | rc80211_minstrel_ht.c | 15 #include "rate.h" 57 /* MCS rate information for an MCS group */ 203 * To enable sufficiently targeted rate sampling, MCS rates are divided into 327 * Look up an MCS group index based on mac80211 rate information 330 minstrel_ht_get_group_idx(struct ieee80211_tx_rate *rate) in minstrel_ht_get_group_idx() argument 332 return GROUP_IDX((rate->idx / 8) + 1, in minstrel_ht_get_group_idx() 333 !!(rate->flags & IEEE80211_TX_RC_SHORT_GI), in minstrel_ht_get_group_idx() 334 !!(rate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH)); in minstrel_ht_get_group_idx() 341 minstrel_ht_ri_get_group_idx(struct rate_info *rate) in minstrel_ht_ri_get_group_idx() argument 343 return GROUP_IDX((rate in minstrel_ht_ri_get_group_idx() 349 minstrel_vht_get_group_idx(struct ieee80211_tx_rate *rate) minstrel_vht_get_group_idx() argument 361 minstrel_vht_ri_get_group_idx(struct rate_info *rate) minstrel_vht_ri_get_group_idx() argument 370 minstrel_ht_get_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi, struct ieee80211_tx_rate *rate) minstrel_ht_get_stats() argument 420 struct rate_info *rate = &rate_status->rate_idx; minstrel_ht_ri_get_stats() local 500 minstrel_ht_get_tp_avg(struct minstrel_ht_sta *mi, int group, int rate, int prob_avg) minstrel_ht_get_tp_avg() argument 1197 minstrel_ht_txstat_valid(struct minstrel_priv *mp, struct minstrel_ht_sta *mi, struct ieee80211_tx_rate *rate) minstrel_ht_txstat_valid() argument 1288 struct minstrel_rate_stats *rate, *rate2; minstrel_ht_tx_status() local 1493 minstrel_ht_get_prob_avg(struct minstrel_ht_sta *mi, int rate) minstrel_ht_get_prob_avg() argument 1505 int rate = MI_RATE_IDX(mi->max_prob_rate); minstrel_ht_get_max_amsdu_len() local 1600 struct ieee80211_tx_rate *rate = &info->status.rates[0]; minstrel_ht_get_rate() local 1882 struct ieee80211_rate *rate = &sband->bitrates[i]; minstrel_ht_fill_rate_array() local [all...] |
/kernel/linux/linux-5.10/drivers/clk/st/ |
H A D | clkgen-pll.c | 124 * DOC: Clock Generated by PLL, rate set and enabled by bootloader 129 * rate - rate is fixed. No clk_set_rate support 304 unsigned long *rate) in clk_pll3200c32_get_rate() 309 *rate = ((2 * (input / 1000) * pll->ndiv) / pll->idf) * 1000; in clk_pll3200c32_get_rate() 319 unsigned long rate = 0; in recalc_stm_pll3200c32() local 329 rate = ((2 * (parent_rate/1000) * ndiv) / idf) * 1000; in recalc_stm_pll3200c32() 331 pr_debug("%s:%s rate %lu\n", clk_hw_get_name(hw), __func__, rate); in recalc_stm_pll3200c32() 333 return rate; in recalc_stm_pll3200c32() 303 clk_pll3200c32_get_rate(unsigned long input, struct stm_pll *pll, unsigned long *rate) clk_pll3200c32_get_rate() argument 336 round_rate_stm_pll3200c32(struct clk_hw *hw, unsigned long rate, unsigned long *prate) round_rate_stm_pll3200c32() argument 357 set_rate_stm_pll3200c32(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) set_rate_stm_pll3200c32() argument 459 clk_pll4600c28_get_rate(unsigned long input, struct stm_pll *pll, unsigned long *rate) clk_pll4600c28_get_rate() argument 475 unsigned long rate; recalc_stm_pll4600c28() local 490 round_rate_stm_pll4600c28(struct clk_hw *hw, unsigned long rate, unsigned long *prate) round_rate_stm_pll4600c28() argument 511 set_rate_stm_pll4600c28(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) set_rate_stm_pll4600c28() argument [all...] |
/kernel/linux/linux-5.10/arch/arm/mach-omap2/ |
H A D | clkt2xxx_dpllcore.c | 43 * omap2xxx_clk_get_core_rate - return the CORE_CLK rate 45 * Returns the CORE_CLK rate. CORE_CLK can have one of three rate 46 * sources on OMAP2xxx: the DPLL CLKOUT rate, DPLL CLKOUTX2, or 32KHz 71 * Uses the current prcm set to tell if a rate is valid. 72 * You can go slower, but not faster within a given rate set. 108 int omap2_reprogram_dpllcore(struct clk_hw *hw, unsigned long rate, in omap2_reprogram_dpllcore() argument 120 if ((rate == (cur_rate / 2)) && (mult == 2)) { in omap2_reprogram_dpllcore() 122 } else if ((rate == (cur_rate * 2)) && (mult == 1)) { in omap2_reprogram_dpllcore() 124 } else if (rate ! in omap2_reprogram_dpllcore() [all...] |
/kernel/linux/linux-6.6/arch/arm/mach-omap2/ |
H A D | clkt2xxx_dpllcore.c | 44 * omap2xxx_clk_get_core_rate - return the CORE_CLK rate 46 * Returns the CORE_CLK rate. CORE_CLK can have one of three rate 47 * sources on OMAP2xxx: the DPLL CLKOUT rate, DPLL CLKOUTX2, or 32KHz 72 * Uses the current prcm set to tell if a rate is valid. 73 * You can go slower, but not faster within a given rate set. 109 int omap2_reprogram_dpllcore(struct clk_hw *hw, unsigned long rate, in omap2_reprogram_dpllcore() argument 121 if ((rate == (cur_rate / 2)) && (mult == 2)) { in omap2_reprogram_dpllcore() 123 } else if ((rate == (cur_rate * 2)) && (mult == 1)) { in omap2_reprogram_dpllcore() 125 } else if (rate ! in omap2_reprogram_dpllcore() [all...] |
/kernel/linux/linux-5.10/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() [all...] |
/kernel/linux/linux-6.6/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 || di in at91sam9x5_clk_smd_set_rate() [all...] |
/kernel/linux/linux-6.6/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() [all...] |
/kernel/linux/linux-5.10/drivers/clk/actions/ |
H A D | owl-divider.c | 18 unsigned long rate, in owl_divider_helper_round_rate() 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() 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() 16 owl_divider_helper_round_rate(struct owl_clk_common *common, const struct owl_divider_hw *div_hw, unsigned long rate, unsigned long *parent_rate) owl_divider_helper_round_rate() argument 61 owl_divider_helper_set_rate(const struct owl_clk_common *common, const struct owl_divider_hw *div_hw, unsigned long rate, unsigned long parent_rate) owl_divider_helper_set_rate() argument
|
/kernel/linux/linux-5.10/drivers/clk/sprd/ |
H A D | div.c | 14 unsigned long rate, in sprd_div_helper_round_rate() 17 return divider_round_rate(&common->hw, rate, parent_rate, in sprd_div_helper_round_rate() 22 static long sprd_div_round_rate(struct clk_hw *hw, unsigned long rate, in sprd_div_round_rate() argument 28 rate, parent_rate); in sprd_div_round_rate() 57 unsigned long rate, in sprd_div_helper_set_rate() 63 val = divider_get_val(rate, parent_rate, NULL, in sprd_div_helper_set_rate() 77 static int sprd_div_set_rate(struct clk_hw *hw, unsigned long rate, in sprd_div_set_rate() argument 83 rate, parent_rate); in sprd_div_set_rate() 12 sprd_div_helper_round_rate(struct sprd_clk_common *common, const struct sprd_div_internal *div, unsigned long rate, unsigned long *parent_rate) sprd_div_helper_round_rate() argument 55 sprd_div_helper_set_rate(const struct sprd_clk_common *common, const struct sprd_div_internal *div, unsigned long rate, unsigned long parent_rate) sprd_div_helper_set_rate() argument
|
/kernel/linux/linux-6.6/drivers/clk/actions/ |
H A D | owl-divider.c | 18 unsigned long rate, in owl_divider_helper_round_rate() 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() 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() 16 owl_divider_helper_round_rate(struct owl_clk_common *common, const struct owl_divider_hw *div_hw, unsigned long rate, unsigned long *parent_rate) owl_divider_helper_round_rate() argument 61 owl_divider_helper_set_rate(const struct owl_clk_common *common, const struct owl_divider_hw *div_hw, unsigned long rate, unsigned long parent_rate) owl_divider_helper_set_rate() argument
|
/kernel/linux/linux-6.6/sound/usb/ |
H A D | format.c | 159 static int set_fixed_rate(struct audioformat *fp, int rate, int rate_bits) in set_fixed_rate() argument 166 fp->rate_min = rate; in set_fixed_rate() 167 fp->rate_max = rate; in set_fixed_rate() 169 fp->rate_table[0] = rate; in set_fixed_rate() 173 /* set up rate_min, rate_max and rates from the rate table */ 176 unsigned int rate; in set_rate_table_min_max() local 183 rate = fp->rate_table[i]; in set_rate_table_min_max() 184 fp->rate_min = min(fp->rate_min, rate); in set_rate_table_min_max() 185 fp->rate_max = max(fp->rate_max, rate); in set_rate_table_min_max() 186 fp->rates |= snd_pcm_rate_to_rate_bit(rate); in set_rate_table_min_max() 225 unsigned int rate = combine_triple(&fmt[idx]); parse_audio_format_rates_v1() local 281 s1810c_valid_sample_rate(struct audioformat *fp, unsigned int rate) s1810c_valid_sample_rate() argument 305 focusrite_valid_sample_rate(struct snd_usb_audio *chip, struct audioformat *fp, unsigned int rate) focusrite_valid_sample_rate() argument 362 unsigned int rate; parse_uac2_sample_rate_range() local [all...] |
/kernel/linux/linux-5.10/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-sdmmc-mux.c | 93 u64 rate = parent_rate; in clk_sdmmc_mux_recalc_rate() local 100 rate *= SDMMC_MUL; in clk_sdmmc_mux_recalc_rate() 101 rate += div - 1; in clk_sdmmc_mux_recalc_rate() 102 do_div(rate, div); in clk_sdmmc_mux_recalc_rate() 104 return rate; in clk_sdmmc_mux_recalc_rate() 114 req->rate = max(req->rate, req->min_rate); in clk_sdmmc_mux_determine_rate() 115 req->rate = min(req->rate, req->max_rate); in clk_sdmmc_mux_determine_rate() 117 if (!req->rate) in clk_sdmmc_mux_determine_rate() 133 clk_sdmmc_mux_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_sdmmc_mux_set_rate() argument 210 unsigned long rate = clk_hw_get_rate(hw); clk_sdmmc_mux_restore_context() local [all...] |
/kernel/linux/linux-5.10/arch/mips/ralink/ |
H A D | clk.c | 20 unsigned long rate; member 23 void ralink_clk_add(const char *dev, unsigned long rate) in ralink_clk_add() argument 33 clk->rate = rate; in ralink_clk_add() 57 return clk->rate; in clk_get_rate() 61 int clk_set_rate(struct clk *clk, unsigned long rate) in clk_set_rate() argument 67 long clk_round_rate(struct clk *clk, unsigned long rate) in clk_round_rate() argument
|
/kernel/linux/linux-6.6/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()
|
/kernel/linux/linux-5.10/drivers/clk/sunxi-ng/ |
H A D | ccu_nkm.c | 19 static void ccu_nkm_find_best(unsigned long parent, unsigned long rate, in ccu_nkm_find_best() argument 33 if (tmp_rate > rate) in ccu_nkm_find_best() 35 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_nkm_find_best() 75 unsigned long n, m, k, rate; in ccu_nkm_recalc_rate() local 98 rate = parent_rate * n * k / m; in ccu_nkm_recalc_rate() 101 rate /= nkm->fixed_post_div; in ccu_nkm_recalc_rate() 103 return rate; in ccu_nkm_recalc_rate() 109 unsigned long rate, in ccu_nkm_round_rate() 123 rate * in ccu_nkm_round_rate() 106 ccu_nkm_round_rate(struct ccu_mux_internal *mux, struct clk_hw *hw, unsigned long *parent_rate, unsigned long rate, void *data) ccu_nkm_round_rate() argument 144 ccu_nkm_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) ccu_nkm_set_rate() argument [all...] |
/kernel/linux/linux-5.10/drivers/clk/at91/ |
H A D | clk-usb.c | 76 tmp_parent_rate = req->rate * div; in at91sam9x5_clk_usb_determine_rate() 83 if (tmp_rate < req->rate) in at91sam9x5_clk_usb_determine_rate() 84 tmp_diff = req->rate - tmp_rate; in at91sam9x5_clk_usb_determine_rate() 86 tmp_diff = tmp_rate - req->rate; in at91sam9x5_clk_usb_determine_rate() 95 if (!best_diff || tmp_rate < req->rate) in at91sam9x5_clk_usb_determine_rate() 106 req->rate = best_rate; in at91sam9x5_clk_usb_determine_rate() 132 static int at91sam9x5_clk_usb_set_rate(struct clk_hw *hw, unsigned long rate, in at91sam9x5_clk_usb_set_rate() argument 138 if (!rate) in at91sam9x5_clk_usb_set_rate() 141 div = DIV_ROUND_CLOSEST(parent_rate, rate); in at91sam9x5_clk_usb_set_rate() 295 static long at91rm9200_clk_usb_round_rate(struct clk_hw *hw, unsigned long rate, in at91rm9200_clk_usb_round_rate() argument 333 at91rm9200_clk_usb_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) at91rm9200_clk_usb_set_rate() argument [all...] |