/openbmc/linux/drivers/gpu/drm/bridge/adv7511/ |
H A D | adv7511_audio.c | 65 unsigned int rate; in adv7511_hdmi_hw_params() local 70 rate = ADV7511_SAMPLE_FREQ_32000; in adv7511_hdmi_hw_params() 73 rate = ADV7511_SAMPLE_FREQ_44100; in adv7511_hdmi_hw_params() 76 rate = ADV7511_SAMPLE_FREQ_48000; in adv7511_hdmi_hw_params() 79 rate = ADV7511_SAMPLE_FREQ_88200; in adv7511_hdmi_hw_params() 82 rate = ADV7511_SAMPLE_FREQ_96000; in adv7511_hdmi_hw_params() 85 rate = ADV7511_SAMPLE_FREQ_176400; in adv7511_hdmi_hw_params() 88 rate = ADV7511_SAMPLE_FREQ_192000; in adv7511_hdmi_hw_params() 155 ADV7511_I2C_FREQ_ID_CFG_RATE_MASK, rate << 4); in adv7511_hdmi_hw_params()
|
/openbmc/u-boot/arch/arm/mach-tegra/tegra20/ |
H A D | emc.c | 172 static int decode_emc(const void *blob, unsigned rate, struct emc_ctlr **emcp, in decode_emc() argument 187 rate = rate / 2 / 1000; in decode_emc() 219 if (node_rate == rate) in decode_emc() 224 rate); in decode_emc() 240 int tegra_set_emc(const void *blob, unsigned rate) in tegra_set_emc() argument 246 err = decode_emc(blob, rate, &emc, &table); in tegra_set_emc()
|
/openbmc/linux/drivers/net/wireless/silabs/wfx/ |
H A D | data_tx.c | 24 if (rate->idx < 0) in wfx_get_hw_rate() 27 if (rate->idx > 7) { in wfx_get_hw_rate() 31 return rate->idx + 14; in wfx_get_hw_rate() 37 if (rate->idx >= band->n_bitrates) { in wfx_get_hw_rate() 434 if (rate->idx < 0) in wfx_tx_fill_rates() 439 rate->count, tx_count); in wfx_tx_fill_rates() 444 if (tx_count > rate->count) { in wfx_tx_fill_rates() 445 tx_count -= rate->count; in wfx_tx_fill_rates() 447 rate->count = 0; in wfx_tx_fill_rates() 448 rate->idx = -1; in wfx_tx_fill_rates() [all …]
|
/openbmc/linux/drivers/cpufreq/ |
H A D | raspberrypi-cpufreq.c | 23 unsigned long rate; in raspberrypi_cpufreq_probe() local 47 for (rate = min; rate <= max; rate += RASPBERRYPI_FREQ_INTERVAL) { in raspberrypi_cpufreq_probe() 48 ret = dev_pm_opp_add(cpu_dev, rate, 0); in raspberrypi_cpufreq_probe()
|
/openbmc/linux/arch/mips/alchemy/common/ |
H A D | clock.c | 195 unsigned long rate, in alchemy_clk_aux_setr() argument 201 if (rate) in alchemy_clk_aux_setr() 381 div1 = prate / rate; in alchemy_calc_div() 433 if (pr < req->rate) in alchemy_clk_fgcs_detr() 440 if (nr > req->rate) in alchemy_clk_fgcs_detr() 468 if (nr > req->rate) in alchemy_clk_fgcs_detr() 486 req->rate = br; in alchemy_clk_fgcs_detr() 556 if (!rate || !parent_rate || rate > (parent_rate / 2)) in alchemy_clk_fgv1_setr() 677 if (!rate || !parent_rate || rate > parent_rate) in alchemy_clk_fgv2_setr() 900 if (!rate || !parent_rate || rate > parent_rate) in alchemy_clk_csrc_setr() [all …]
|
/openbmc/linux/drivers/clk/qcom/ |
H A D | clk-pll.c | 84 unsigned long rate; in clk_pll_recalc_rate() local 95 rate = parent_rate * l; in clk_pll_recalc_rate() 100 rate += tmp; in clk_pll_recalc_rate() 106 rate /= config + 1; in clk_pll_recalc_rate() 109 return rate; in clk_pll_recalc_rate() 119 if (rate <= f->freq) in find_freq() 131 f = find_freq(pll->freq_tbl, req->rate); in clk_pll_determine_rate() 133 req->rate = clk_pll_recalc_rate(hw, req->best_parent_rate); in clk_pll_determine_rate() 135 req->rate = f->freq; in clk_pll_determine_rate() 149 f = find_freq(pll->freq_tbl, rate); in clk_pll_set_rate() [all …]
|
H A D | clk-regmap-mux-div.c | 94 unsigned long req_rate = req->rate; in mux_div_determine_rate() 108 req->rate = best_rate; in mux_div_determine_rate() 124 static int __mux_div_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, in __mux_div_set_rate_and_parent() argument 139 parent_rate = mult_frac(rate, div, 2); in __mux_div_set_rate_and_parent() 143 if (is_better_rate(rate, best_rate, actual_rate)) { in __mux_div_set_rate_and_parent() 149 if (actual_rate < rate || best_rate <= rate) in __mux_div_set_rate_and_parent() 187 unsigned long rate, unsigned long prate) in mux_div_set_rate() argument 191 return __mux_div_set_rate_and_parent(hw, rate, prate, md->src); in mux_div_set_rate() 194 static int mux_div_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, in mux_div_set_rate_and_parent() argument 199 return __mux_div_set_rate_and_parent(hw, rate, prate, in mux_div_set_rate_and_parent()
|
H A D | clk-regmap-divider.c | 18 static long div_round_ro_rate(struct clk_hw *hw, unsigned long rate, in div_round_ro_rate() argument 29 return divider_ro_round_rate(hw, rate, prate, NULL, divider->width, in div_round_ro_rate() 33 static long div_round_rate(struct clk_hw *hw, unsigned long rate, in div_round_rate() argument 38 return divider_round_rate(hw, rate, prate, NULL, divider->width, in div_round_rate() 42 static int div_set_rate(struct clk_hw *hw, unsigned long rate, in div_set_rate() argument 49 div = divider_get_val(rate, parent_rate, NULL, divider->width, in div_set_rate()
|
/openbmc/linux/sound/core/oss/ |
H A D | rate.c | 193 if (plugin->src_format.rate < plugin->dst_format.rate) { in rate_src_frames() 226 if (plugin->src_format.rate < plugin->dst_format.rate) { in rate_dst_frames() 321 if (snd_BUG_ON(src_format->rate == dst_format->rate)) in snd_pcm_plugin_build_rate() 332 if (src_format->rate < dst_format->rate) { in snd_pcm_plugin_build_rate() 333 data->pitch = ((src_format->rate << SHIFT) + (dst_format->rate >> 1)) / dst_format->rate; in snd_pcm_plugin_build_rate() 336 data->pitch = ((dst_format->rate << SHIFT) + (src_format->rate >> 1)) / src_format->rate; in snd_pcm_plugin_build_rate()
|
/openbmc/u-boot/drivers/clk/rockchip/ |
H A D | clk_rv1108.c | 155 if (!rate) in rv1108_mac_set_clk() 156 rate = 50000000; in rv1108_mac_set_clk() 158 div = DIV_ROUND_UP(pll_rate, rate) - 1; in rv1108_mac_set_clk() 179 div = DIV_ROUND_UP(pll_rate, rate) - 1; in rv1108_sfc_set_clk() 184 debug("Unsupported sfc clk rate:%d\n", rate); in rv1108_sfc_set_clk() 525 div = DIV_ROUND_UP(pll_rate / 2, rate); in rv1108_mmc_set_clk() 578 new_rate = rv1108_mac_set_clk(priv->cru, rate); in rv1108_clk_set_rate() 581 new_rate = rv1108_sfc_set_clk(priv->cru, rate); in rv1108_clk_set_rate() 584 new_rate = rv1108_saradc_set_clk(priv->cru, rate); in rv1108_clk_set_rate() 593 new_rate = rv1108_dclk_vop_set_clk(priv->cru, rate); in rv1108_clk_set_rate() [all …]
|
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/ |
H A D | rl.c | 160 bool mlx5_rl_is_in_range(struct mlx5_core_dev *dev, u32 rate) in mlx5_rl_is_in_range() argument 164 return (rate <= table->max_rate && rate >= table->min_rate); in mlx5_rl_is_in_range() 171 return ((rl_0->rate == rl_1->rate) && in mlx5_rl_are_equal() 245 u32 rate; in mlx5_rl_add_rate_raw() local 251 rate = MLX5_GET(set_pp_rate_limit_context, rl_in, rate_limit); in mlx5_rl_add_rate_raw() 252 if (!rate || !mlx5_rl_is_in_range(dev, rate)) { in mlx5_rl_add_rate_raw() 254 rate, table->min_rate, table->max_rate); in mlx5_rl_add_rate_raw() 279 err, rate, in mlx5_rl_add_rate_raw() 320 MLX5_SET(set_pp_rate_limit_context, rl_raw, rate_limit, rl->rate); in mlx5_rl_add_rate() 340 if (rl->rate == 0) in mlx5_rl_remove_rate() [all …]
|
/openbmc/linux/drivers/phy/rockchip/ |
H A D | phy-rockchip-emmc.c | 99 unsigned long rate; in rockchip_emmc_phy_power() local 121 rate = clk_get_rate(rk_phy->emmcclk); in rockchip_emmc_phy_power() 123 if (rate != 0) { in rockchip_emmc_phy_power() 127 switch (rate) { in rockchip_emmc_phy_power() 145 diff = (rate > ideal_rate) ? in rockchip_emmc_phy_power() 146 rate - ideal_rate : ideal_rate - rate; in rockchip_emmc_phy_power() 154 if ((rate > 50000000 && diff > 15000000) || (rate > 200000000)) in rockchip_emmc_phy_power() 155 dev_warn(&phy->dev, "Unsupported rate: %lu\n", rate); in rockchip_emmc_phy_power() 208 if (rate == 0) in rockchip_emmc_phy_power()
|
/openbmc/linux/drivers/phy/mediatek/ |
H A D | phy-mtk-hdmi-mt8173.c | 121 static long mtk_hdmi_pll_round_rate(struct clk_hw *hw, unsigned long rate, in mtk_hdmi_pll_round_rate() argument 126 hdmi_phy->pll_rate = rate; in mtk_hdmi_pll_round_rate() 127 if (rate <= 74250000) in mtk_hdmi_pll_round_rate() 128 *parent_rate = rate; in mtk_hdmi_pll_round_rate() 130 *parent_rate = rate / 2; in mtk_hdmi_pll_round_rate() 132 return rate; in mtk_hdmi_pll_round_rate() 135 static int mtk_hdmi_pll_set_rate(struct clk_hw *hw, unsigned long rate, in mtk_hdmi_pll_set_rate() argument 147 rate, parent_rate); in mtk_hdmi_pll_set_rate() 149 if (rate <= 27000000) { in mtk_hdmi_pll_set_rate() 152 } else if (rate <= 74250000) { in mtk_hdmi_pll_set_rate() [all …]
|
/openbmc/u-boot/drivers/clk/tegra/ |
H A D | tegra186-clk.c | 28 return resp.clk_get_rate.rate; in tegra186_clk_get_rate() 31 static ulong tegra186_clk_set_rate(struct clk *clk, ulong rate) in tegra186_clk_set_rate() argument 37 debug("%s(clk=%p, rate=%lu) (dev=%p, id=%lu)\n", __func__, clk, rate, in tegra186_clk_set_rate() 41 req.clk_set_rate.rate = rate; in tegra186_clk_set_rate() 48 return resp.clk_set_rate.rate; in tegra186_clk_set_rate()
|
/openbmc/linux/sound/pci/echoaudio/ |
H A D | darla24_dsp.c | 99 static int set_sample_rate(struct echoaudio *chip, u32 rate) in set_sample_rate() argument 103 switch (rate) { in set_sample_rate() 134 rate); in set_sample_rate() 142 "set_sample_rate: %d clock %d\n", rate, clock); in set_sample_rate() 143 chip->sample_rate = rate; in set_sample_rate() 149 chip->comm_page->sample_rate = cpu_to_le32(rate); /* ignored by the DSP ? */ in set_sample_rate()
|
/openbmc/u-boot/drivers/phy/ |
H A D | ti-pipe3-phy.c | 74 unsigned long rate; member 92 u32 rate; in omap_pipe3_get_dpll_params() local 95 rate = get_sys_clk_freq(); in omap_pipe3_get_dpll_params() 97 for (; dpll_map->rate; dpll_map++) { in omap_pipe3_get_dpll_params() 98 if (rate == dpll_map->rate) in omap_pipe3_get_dpll_params() 103 __func__, rate); in omap_pipe3_get_dpll_params() 170 u32 val, rate; in omap_control_pipe3_power() local 174 rate = get_sys_clk_freq(); in omap_control_pipe3_power() 175 rate = rate/1000000; in omap_control_pipe3_power() 182 val |= rate << in omap_control_pipe3_power()
|
/openbmc/linux/drivers/clk/starfive/ |
H A D | clk-starfive-jh71x0.c | 81 unsigned long rate = clamp(req->rate, req->min_rate, req->max_rate); in jh71x0_clk_determine_rate() local 82 unsigned long div = min_t(unsigned long, DIV_ROUND_UP(parent, rate), clk->max_div); in jh71x0_clk_determine_rate() 101 req->rate = result; in jh71x0_clk_determine_rate() 106 unsigned long rate, in jh71x0_clk_set_rate() argument 110 unsigned long div = clamp(DIV_ROUND_CLOSEST(parent_rate, rate), in jh71x0_clk_set_rate() 132 unsigned long rate = clamp(req->rate, req->min_rate, req->max_rate); in jh71x0_clk_frac_determine_rate() local 133 unsigned long div100 = clamp(DIV_ROUND_CLOSEST(parent100, rate), in jh71x0_clk_frac_determine_rate() 143 req->rate = result; in jh71x0_clk_frac_determine_rate() 148 unsigned long rate, in jh71x0_clk_frac_set_rate() argument 152 unsigned long div100 = clamp(DIV_ROUND_CLOSEST(100 * parent_rate, rate), in jh71x0_clk_frac_set_rate()
|
/openbmc/linux/arch/arm/boot/dts/nxp/lpc/ |
H A D | lpc4357-myd-lpc4357.dts | 125 slew-rate = <1>; 137 slew-rate = <1>; 144 slew-rate = <1>; 151 slew-rate = <1>; 158 slew-rate = <1>; 165 slew-rate = <1>; 172 slew-rate = <1>; 179 slew-rate = <1>; 188 slew-rate = <1>; 199 slew-rate = <1>; [all …]
|
/openbmc/linux/net/sched/ |
H A D | sch_tbf.c | 104 struct psched_ratecfg rate; member 154 qopt.replace_params.rate = q->rate; in tbf_offload_change() 294 toks -= (s64) psched_l2t_ns(&q->rate, len); in tbf_dequeue() 359 struct psched_ratecfg rate; in tbf_change() local 376 qdisc_put_rtab(qdisc_get_rtab(&qopt->rate, in tbf_change() 390 psched_ratecfg_precompute(&rate, &qopt->rate, rate64); in tbf_change() 394 buffer = psched_l2t_ns(&rate, max_size); in tbf_change() 399 if (qopt->peakrate.rate) { in tbf_change() 405 peak.rate_bytes_ps, rate.rate_bytes_ps); in tbf_change() 466 memcpy(&q->rate, &rate, sizeof(struct psched_ratecfg)); in tbf_change() [all …]
|
/openbmc/linux/sound/firewire/oxfw/ |
H A D | oxfw-stream.c | 45 err = avc_general_set_sig_fmt(oxfw->unit, rate, in set_rate() 51 err = avc_general_set_sig_fmt(oxfw->unit, rate, in set_rate() 80 if ((formation.rate == rate) && (formation.pcm == pcm_channels)) in set_stream_format() 88 return set_rate(oxfw, rate); in set_stream_format() 232 if (fmt.rate == formation.rate && fmt.pcm == formation.pcm && in keep_resources() 280 if (rate == 0) { in snd_oxfw_stream_reserve_duplex() 281 rate = formation.rate; in snd_oxfw_stream_reserve_duplex() 284 if (formation.rate != rate || formation.pcm != pcm_channels) { in snd_oxfw_stream_reserve_duplex() 297 formation.rate != rate || formation.pcm != pcm_channels) { in snd_oxfw_stream_reserve_duplex() 541 formation->rate = oxfw_rate_table[i]; in snd_oxfw_stream_parse_format() [all …]
|
/openbmc/linux/drivers/net/ethernet/aquantia/atlantic/hw_atl/ |
H A D | hw_atl_utils_fw2x.c | 130 rate |= FW2X_RATE_10G; in link_speed_mask_2fw2x_ratemask() 133 rate |= FW2X_RATE_5G; in link_speed_mask_2fw2x_ratemask() 136 rate |= FW2X_RATE_2G5; in link_speed_mask_2fw2x_ratemask() 139 rate |= FW2X_RATE_1G; in link_speed_mask_2fw2x_ratemask() 142 rate |= FW2X_RATE_100M; in link_speed_mask_2fw2x_ratemask() 144 return rate; in link_speed_mask_2fw2x_ratemask() 149 u32 rate = 0; in fw2x_to_eee_mask() local 154 rate |= AQ_NIC_RATE_EEE_5G; in fw2x_to_eee_mask() 160 return rate; in fw2x_to_eee_mask() 165 u32 rate = 0; in eee_mask_to_fw2x() local [all …]
|
/openbmc/linux/drivers/gpu/drm/tegra/ |
H A D | dp.c | 50 link->rate = 0; in drm_dp_link_reset() 91 link->rates[pivot] = rate; in drm_dp_link_add_rate() 116 if (rate == link->rates[i]) in drm_dp_link_remove_rate() 232 link->rate = link->max_rate; in drm_dp_link_probe() 239 u16 rate; in drm_dp_link_probe() local 419 link->rate = rates[j]; in drm_dp_link_choose() 705 switch (link->rate) { in drm_dp_link_downgrade() 710 link->rate = 162000; in drm_dp_link_downgrade() 714 link->rate = 270000; in drm_dp_link_downgrade() 739 link->rate / 100); in drm_dp_link_train_full() [all …]
|
/openbmc/linux/drivers/clk/mstar/ |
H A D | clk-msc313-cpupll.c | 126 static u32 msc313_cpupll_regforfrequecy(unsigned long rate, unsigned long parent_rate) in msc313_cpupll_regforfrequecy() argument 130 if (prescaled == 0 || rate == 0) in msc313_cpupll_regforfrequecy() 132 return DIV_ROUND_UP_ULL(prescaled, rate); in msc313_cpupll_regforfrequecy() 143 static long msc313_cpupll_round_rate(struct clk_hw *hw, unsigned long rate, in msc313_cpupll_round_rate() argument 146 u32 reg = msc313_cpupll_regforfrequecy(rate, *parent_rate); in msc313_cpupll_round_rate() 153 for (; rounded >= rate && reg > 0; reg--) in msc313_cpupll_round_rate() 159 static int msc313_cpupll_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) in msc313_cpupll_set_rate() argument 162 u32 reg = msc313_cpupll_regforfrequecy(rate, parent_rate); in msc313_cpupll_set_rate()
|
/openbmc/linux/drivers/clk/tegra/ |
H A D | clk-utils.c | 12 int div_frac_get(unsigned long rate, unsigned parent_rate, u8 width, in div_frac_get() argument 18 if (!rate) in div_frac_get() 27 divider_ux1 += rate - 1; in div_frac_get() 29 do_div(divider_ux1, rate); in div_frac_get()
|
/openbmc/linux/sound/firewire/digi00x/ |
H A D | digi00x-proc.c | 40 unsigned int rate; in proc_read_clock() local 46 if (snd_dg00x_stream_get_local_rate(dg00x, &rate) < 0) in proc_read_clock() 52 snd_iprintf(buf, "Sampling Rate: %d\n", rate); in proc_read_clock() 64 if (snd_dg00x_stream_get_external_rate(dg00x, &rate) >= 0) in proc_read_clock() 65 snd_iprintf(buf, "External sampling rate: %d\n", rate); in proc_read_clock()
|