/kernel/linux/linux-5.10/drivers/net/wireless/mediatek/mt7601u/ |
H A D | tx.c | 73 u8 req_rate = stat->pktid; in mt7601u_tx_pktid_dec() local 76 req_rate -= 1; in mt7601u_tx_pktid_dec() 78 if (req_rate > 7) { in mt7601u_tx_pktid_dec() 80 req_rate -= 8; in mt7601u_tx_pktid_dec() 83 if (!req_rate && eff_rate) in mt7601u_tx_pktid_dec() 84 req_rate = 7; in mt7601u_tx_pktid_dec() 87 stat->retry = req_rate - eff_rate; in mt7601u_tx_pktid_dec()
|
/kernel/linux/linux-6.6/drivers/net/wireless/mediatek/mt7601u/ |
H A D | tx.c | 73 u8 req_rate = stat->pktid; in mt7601u_tx_pktid_dec() local 76 req_rate -= 1; in mt7601u_tx_pktid_dec() 78 if (req_rate > 7) { in mt7601u_tx_pktid_dec() 80 req_rate -= 8; in mt7601u_tx_pktid_dec() 83 if (!req_rate && eff_rate) in mt7601u_tx_pktid_dec() 84 req_rate = 7; in mt7601u_tx_pktid_dec() 87 stat->retry = req_rate - eff_rate; in mt7601u_tx_pktid_dec()
|
/kernel/linux/linux-5.10/drivers/clocksource/ |
H A D | ingenic-sysost.c | 120 static u8 ingenic_ost_get_prescale(unsigned long rate, unsigned long req_rate) in ingenic_ost_get_prescale() argument 125 if ((rate >> (prescale * 2)) <= req_rate) in ingenic_ost_get_prescale() 131 static long ingenic_ost_round_rate(struct clk_hw *hw, unsigned long req_rate, in ingenic_ost_round_rate() argument 137 if (req_rate > rate) in ingenic_ost_round_rate() 140 prescale = ingenic_ost_get_prescale(rate, req_rate); in ingenic_ost_round_rate() 145 static int ingenic_ost_percpu_timer_set_rate(struct clk_hw *hw, unsigned long req_rate, in ingenic_ost_percpu_timer_set_rate() argument 150 u8 prescale = ingenic_ost_get_prescale(parent_rate, req_rate); in ingenic_ost_percpu_timer_set_rate() 160 static int ingenic_ost_global_timer_set_rate(struct clk_hw *hw, unsigned long req_rate, in ingenic_ost_global_timer_set_rate() argument 165 u8 prescale = ingenic_ost_get_prescale(parent_rate, req_rate); in ingenic_ost_global_timer_set_rate()
|
/kernel/linux/linux-5.10/sound/soc/sh/rcar/ |
H A D | adg.c | 412 u32 req_rate[REQ_SIZE] = {}; in rsnd_adg_get_clkout() local 449 of_property_read_u32_array(np, "clock-frequency", req_rate, req_size); in rsnd_adg_get_clkout() 453 if (0 == (req_rate[i] % 44100)) in rsnd_adg_get_clkout() 454 req_441kHz_rate = req_rate[i]; in rsnd_adg_get_clkout() 455 if (0 == (req_rate[i] % 48000)) in rsnd_adg_get_clkout() 456 req_48kHz_rate = req_rate[i]; in rsnd_adg_get_clkout() 459 if (req_rate[0] % 48000 == 0) in rsnd_adg_get_clkout() 526 parent_clk_name, 0, req_rate[0]); in rsnd_adg_get_clkout() 539 req_rate[0]); in rsnd_adg_get_clkout()
|
/kernel/linux/linux-6.6/drivers/clocksource/ |
H A D | ingenic-sysost.c | 119 static u8 ingenic_ost_get_prescale(unsigned long rate, unsigned long req_rate) in ingenic_ost_get_prescale() argument 124 if ((rate >> (prescale * 2)) <= req_rate) in ingenic_ost_get_prescale() 130 static long ingenic_ost_round_rate(struct clk_hw *hw, unsigned long req_rate, in ingenic_ost_round_rate() argument 136 if (req_rate > rate) in ingenic_ost_round_rate() 139 prescale = ingenic_ost_get_prescale(rate, req_rate); in ingenic_ost_round_rate() 144 static int ingenic_ost_percpu_timer_set_rate(struct clk_hw *hw, unsigned long req_rate, in ingenic_ost_percpu_timer_set_rate() argument 149 u8 prescale = ingenic_ost_get_prescale(parent_rate, req_rate); in ingenic_ost_percpu_timer_set_rate() 160 static int ingenic_ost_global_timer_set_rate(struct clk_hw *hw, unsigned long req_rate, in ingenic_ost_global_timer_set_rate() argument 165 u8 prescale = ingenic_ost_get_prescale(parent_rate, req_rate); in ingenic_ost_global_timer_set_rate()
|
/kernel/linux/linux-5.10/drivers/clk/ingenic/ |
H A D | cgu.c | 156 ingenic_pll_round_rate(struct clk_hw *hw, unsigned long req_rate, in ingenic_pll_round_rate() argument 162 return ingenic_pll_calc(clk_info, req_rate, *prate, NULL, NULL, NULL); in ingenic_pll_round_rate() 176 ingenic_pll_set_rate(struct clk_hw *hw, unsigned long req_rate, in ingenic_pll_set_rate() argument 188 rate = ingenic_pll_calc(clk_info, req_rate, parent_rate, in ingenic_pll_set_rate() 190 if (rate != req_rate) in ingenic_pll_set_rate() 192 clk_info->name, req_rate, rate); in ingenic_pll_set_rate() 414 unsigned long parent_rate, unsigned long req_rate) in ingenic_clk_calc_div() 419 div = DIV_ROUND_UP(parent_rate, req_rate); in ingenic_clk_calc_div() 443 ingenic_clk_round_rate(struct clk_hw *hw, unsigned long req_rate, in ingenic_clk_round_rate() argument 451 div = ingenic_clk_calc_div(clk_info, *parent_rate, req_rate); in ingenic_clk_round_rate() 413 ingenic_clk_calc_div(const struct ingenic_cgu_clk_info *clk_info, unsigned long parent_rate, unsigned long req_rate) ingenic_clk_calc_div() argument 471 ingenic_clk_set_rate(struct clk_hw *hw, unsigned long req_rate, unsigned long parent_rate) ingenic_clk_set_rate() argument [all...] |
H A D | x1000-cgu.c | 86 static long x1000_otg_phy_round_rate(struct clk_hw *hw, unsigned long req_rate, in x1000_otg_phy_round_rate() argument 89 if (req_rate < 18000000) in x1000_otg_phy_round_rate() 92 if (req_rate < 36000000) in x1000_otg_phy_round_rate() 98 static int x1000_otg_phy_set_rate(struct clk_hw *hw, unsigned long req_rate, in x1000_otg_phy_set_rate() argument 104 switch (req_rate) { in x1000_otg_phy_set_rate()
|
H A D | tcu.c | 169 static u8 ingenic_tcu_get_prescale(unsigned long rate, unsigned long req_rate) in ingenic_tcu_get_prescale() argument 174 if ((rate >> (prescale * 2)) <= req_rate) in ingenic_tcu_get_prescale() 180 static long ingenic_tcu_round_rate(struct clk_hw *hw, unsigned long req_rate, in ingenic_tcu_round_rate() argument 186 if (req_rate > rate) in ingenic_tcu_round_rate() 189 prescale = ingenic_tcu_get_prescale(rate, req_rate); in ingenic_tcu_round_rate() 194 static int ingenic_tcu_set_rate(struct clk_hw *hw, unsigned long req_rate, in ingenic_tcu_set_rate() argument 199 u8 prescale = ingenic_tcu_get_prescale(parent_rate, req_rate); in ingenic_tcu_set_rate()
|
H A D | jz4780-cgu.c | 131 static long jz4780_otg_phy_round_rate(struct clk_hw *hw, unsigned long req_rate, in jz4780_otg_phy_round_rate() argument 134 if (req_rate < 15600000) in jz4780_otg_phy_round_rate() 137 if (req_rate < 21600000) in jz4780_otg_phy_round_rate() 140 if (req_rate < 36000000) in jz4780_otg_phy_round_rate() 146 static int jz4780_otg_phy_set_rate(struct clk_hw *hw, unsigned long req_rate, in jz4780_otg_phy_set_rate() argument 152 switch (req_rate) { in jz4780_otg_phy_set_rate()
|
/kernel/linux/linux-5.10/drivers/clk/qcom/ |
H A D | clk-regmap-mux-div.c | 94 unsigned long req_rate = req->rate; in mux_div_determine_rate() local 102 parent_rate = mult_frac(req_rate, div, 2); in mux_div_determine_rate() 106 if (is_better_rate(req_rate, best_rate, actual_rate)) { in mux_div_determine_rate() 113 if (actual_rate < req_rate || best_rate <= req_rate) in mux_div_determine_rate()
|
/kernel/linux/linux-6.6/drivers/clk/qcom/ |
H A D | clk-regmap-mux-div.c | 94 unsigned long req_rate = req->rate; in mux_div_determine_rate() local 102 parent_rate = mult_frac(req_rate, div, 2); in mux_div_determine_rate() 106 if (is_better_rate(req_rate, best_rate, actual_rate)) { in mux_div_determine_rate() 113 if (actual_rate < req_rate || best_rate <= req_rate) in mux_div_determine_rate()
|
/kernel/linux/linux-6.6/drivers/clk/ingenic/ |
H A D | cgu.c | 178 ingenic_pll_round_rate(struct clk_hw *hw, unsigned long req_rate, in ingenic_pll_round_rate() argument 184 return ingenic_pll_calc(clk_info, req_rate, *prate, NULL, NULL, NULL); in ingenic_pll_round_rate() 201 ingenic_pll_set_rate(struct clk_hw *hw, unsigned long req_rate, in ingenic_pll_set_rate() argument 213 rate = ingenic_pll_calc(clk_info, req_rate, parent_rate, in ingenic_pll_set_rate() 215 if (rate != req_rate) in ingenic_pll_set_rate() 217 clk_info->name, req_rate, rate); in ingenic_pll_set_rate() 461 unsigned long parent_rate, unsigned long req_rate) in ingenic_clk_calc_div() 471 div = DIV_ROUND_UP(parent_rate, req_rate); in ingenic_clk_calc_div() 524 ingenic_clk_set_rate(struct clk_hw *hw, unsigned long req_rate, in ingenic_clk_set_rate() argument 536 div = ingenic_clk_calc_div(hw, clk_info, parent_rate, req_rate); in ingenic_clk_set_rate() 459 ingenic_clk_calc_div(struct clk_hw *hw, const struct ingenic_cgu_clk_info *clk_info, unsigned long parent_rate, unsigned long req_rate) ingenic_clk_calc_div() argument [all...] |
H A D | jz4780-cgu.c | 131 static long jz4780_otg_phy_round_rate(struct clk_hw *hw, unsigned long req_rate, in jz4780_otg_phy_round_rate() argument 134 if (req_rate < 15600000) in jz4780_otg_phy_round_rate() 137 if (req_rate < 21600000) in jz4780_otg_phy_round_rate() 140 if (req_rate < 36000000) in jz4780_otg_phy_round_rate() 146 static int jz4780_otg_phy_set_rate(struct clk_hw *hw, unsigned long req_rate, in jz4780_otg_phy_set_rate() argument 152 switch (req_rate) { in jz4780_otg_phy_set_rate()
|
H A D | x1000-cgu.c | 87 static long x1000_otg_phy_round_rate(struct clk_hw *hw, unsigned long req_rate, in x1000_otg_phy_round_rate() argument 90 if (req_rate < 18000000) in x1000_otg_phy_round_rate() 93 if (req_rate < 36000000) in x1000_otg_phy_round_rate() 99 static int x1000_otg_phy_set_rate(struct clk_hw *hw, unsigned long req_rate, in x1000_otg_phy_set_rate() argument 105 switch (req_rate) { in x1000_otg_phy_set_rate()
|
H A D | tcu.c | 170 static u8 ingenic_tcu_get_prescale(unsigned long rate, unsigned long req_rate) in ingenic_tcu_get_prescale() argument 175 if ((rate >> (prescale * 2)) <= req_rate) in ingenic_tcu_get_prescale() 198 static int ingenic_tcu_set_rate(struct clk_hw *hw, unsigned long req_rate, in ingenic_tcu_set_rate() argument 203 u8 prescale = ingenic_tcu_get_prescale(parent_rate, req_rate); in ingenic_tcu_set_rate()
|
/kernel/linux/linux-6.6/sound/soc/sh/rcar/ |
H A D | adg.c | 493 u32 req_rate[ADG_HZ_SIZE] = {}; in rsnd_adg_get_clkout() local 526 of_property_read_u32_array(np, "clock-frequency", req_rate, req_size); in rsnd_adg_get_clkout() 530 if (0 == (req_rate[i] % 44100)) in rsnd_adg_get_clkout() 531 req_Hz[ADG_HZ_441] = req_rate[i]; in rsnd_adg_get_clkout() 532 if (0 == (req_rate[i] % 48000)) in rsnd_adg_get_clkout() 533 req_Hz[ADG_HZ_48] = req_rate[i]; in rsnd_adg_get_clkout() 635 parent_clk_name, 0, req_rate[0]); in rsnd_adg_get_clkout() 650 req_rate[0]); in rsnd_adg_get_clkout()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/arm/ |
H A D | malidp_crtc.c | 32 * but skip the check if the clock is meant to be disabled (req_rate = 0) in malidp_crtc_mode_valid() 34 long rate, req_rate = mode->crtc_clock * 1000; in malidp_crtc_mode_valid() local 36 if (req_rate) { in malidp_crtc_mode_valid() 37 rate = clk_round_rate(hwdev->pxlclk, req_rate); in malidp_crtc_mode_valid() 38 if (rate != req_rate) { in malidp_crtc_mode_valid() 40 req_rate); in malidp_crtc_mode_valid()
|
/kernel/linux/linux-6.6/drivers/gpu/drm/arm/ |
H A D | malidp_crtc.c | 33 * but skip the check if the clock is meant to be disabled (req_rate = 0) in malidp_crtc_mode_valid() 35 long rate, req_rate = mode->crtc_clock * 1000; in malidp_crtc_mode_valid() local 37 if (req_rate) { in malidp_crtc_mode_valid() 38 rate = clk_round_rate(hwdev->pxlclk, req_rate); in malidp_crtc_mode_valid() 39 if (rate != req_rate) { in malidp_crtc_mode_valid() 41 req_rate); in malidp_crtc_mode_valid()
|
/kernel/linux/linux-5.10/drivers/infiniband/hw/mthca/ |
H A D | mthca_av.c | 106 static u8 ib_rate_to_memfree(u8 req_rate, u8 cur_rate) in ib_rate_to_memfree() argument 108 if (cur_rate <= req_rate) in ib_rate_to_memfree() 115 switch ((cur_rate - 1) / req_rate) { in ib_rate_to_memfree()
|
/kernel/linux/linux-6.6/drivers/infiniband/hw/mthca/ |
H A D | mthca_av.c | 106 static u8 ib_rate_to_memfree(u8 req_rate, u8 cur_rate) in ib_rate_to_memfree() argument 108 if (cur_rate <= req_rate) in ib_rate_to_memfree() 115 switch ((cur_rate - 1) / req_rate) { in ib_rate_to_memfree()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/tilcdc/ |
H A D | tilcdc_crtc.c | 209 unsigned long clk_rate, real_rate, req_rate; in tilcdc_crtc_set_clk() local 216 req_rate = crtc->mode.clock * 1000; in tilcdc_crtc_set_clk() 218 ret = clk_set_rate(priv->clk, req_rate * clkdiv); in tilcdc_crtc_set_clk() 220 if (ret < 0 || tilcdc_pclk_diff(req_rate, clk_rate) > 5) { in tilcdc_crtc_set_clk() 235 clkdiv = DIV_ROUND_CLOSEST(clk_rate, req_rate); in tilcdc_crtc_set_clk() 244 real_rate = clkdiv * req_rate; in tilcdc_crtc_set_clk()
|
/kernel/linux/linux-6.6/drivers/clk/at91/ |
H A D | clk-master.c | 627 unsigned long req_rate; in clk_sama7g5_master_determine_rate() local 630 req_rate = req->rate * 3; in clk_sama7g5_master_determine_rate() 632 req_rate = req->rate << div; in clk_sama7g5_master_determine_rate() 634 clk_hw_forward_rate_request(hw, req, parent, &req_parent, req_rate); in clk_sama7g5_master_determine_rate()
|
/kernel/linux/linux-5.10/drivers/mmc/host/ |
H A D | meson-gx-mmc.c | 158 unsigned long req_rate; member 348 if (host->ddr == ddr && host->req_rate == rate) in meson_mmc_clk_set() 353 host->req_rate = 0; in meson_mmc_clk_set() 382 host->req_rate = rate; in meson_mmc_clk_set() 387 host->req_rate >>= 1; in meson_mmc_clk_set()
|
/kernel/linux/linux-6.6/drivers/mmc/host/ |
H A D | meson-gx-mmc.c | 160 unsigned long req_rate; member 361 if (host->ddr == ddr && host->req_rate == rate) in meson_mmc_clk_set() 366 host->req_rate = 0; in meson_mmc_clk_set() 395 host->req_rate = rate; in meson_mmc_clk_set() 400 host->req_rate >>= 1; in meson_mmc_clk_set()
|
/kernel/linux/linux-5.10/drivers/clk/ |
H A D | clk.c | 73 unsigned long req_rate; member 2255 unsigned long req_rate) in clk_core_req_round_rate_nolock() 2271 req.rate = req_rate; in clk_core_req_round_rate_nolock() 2282 unsigned long req_rate) in clk_core_set_rate_nolock() 2291 rate = clk_core_req_round_rate_nolock(core, req_rate); in clk_core_set_rate_nolock() 2302 top = clk_calc_new_rates(core, req_rate); in clk_core_set_rate_nolock() 2323 core->req_rate = req_rate; in clk_core_set_rate_nolock() 3519 * __clk_init_parent() will set the initial req_rate to in clk_core_reparent_orphans_nolock() 3523 * 'req_rate' i in clk_core_reparent_orphans_nolock() 2254 clk_core_req_round_rate_nolock(struct clk_core *core, unsigned long req_rate) clk_core_req_round_rate_nolock() argument 2281 clk_core_set_rate_nolock(struct clk_core *core, unsigned long req_rate) clk_core_set_rate_nolock() argument [all...] |