| /Linux-v4.19/drivers/clk/ti/ |
| D | clkt_dpll.c | 143 static int _dpll_test_mult(int *m, int n, unsigned long *new_rate, in _dpll_test_mult() argument 158 *new_rate = _dpll_compute_new_rate(parent_rate, *m, n); in _dpll_test_mult() 159 if (*new_rate > target_rate) { in _dpll_test_mult() 161 *new_rate = 0; in _dpll_test_mult() 167 *new_rate = 0; in _dpll_test_mult() 171 if (*new_rate == 0) in _dpll_test_mult() 172 *new_rate = _dpll_compute_new_rate(parent_rate, *m, n); in _dpll_test_mult() 292 unsigned long new_rate = 0; in omap2_dpll_round_rate() local 337 r = _dpll_test_mult(&m, n, &new_rate, target_rate, in omap2_dpll_round_rate() 345 delta = target_rate - new_rate; in omap2_dpll_round_rate() [all …]
|
| /Linux-v4.19/drivers/clk/hisilicon/ |
| D | clk-hi6220-stub.c | 147 unsigned long new_rate = rate / 1000; /* kHz */ in hi6220_stub_clk_set_rate() local 152 ret = hi6220_acpu_set_freq(stub_clk, new_rate); in hi6220_stub_clk_set_rate() 164 pr_debug("%s: set rate=%ldkHz\n", __func__, new_rate); in hi6220_stub_clk_set_rate() 172 unsigned long new_rate = rate / 1000; /* kHz */ in hi6220_stub_clk_round_rate() local 176 new_rate = hi6220_acpu_round_freq(stub_clk, new_rate); in hi6220_stub_clk_round_rate() 179 new_rate *= 1000; in hi6220_stub_clk_round_rate() 188 return new_rate; in hi6220_stub_clk_round_rate()
|
| /Linux-v4.19/drivers/cpufreq/ |
| D | arm_big_little.c | 133 u32 new_rate, prev_rate; in bL_cpufreq_set_rate() local 144 new_rate = find_cluster_maxfreq(new_cluster); in bL_cpufreq_set_rate() 145 new_rate = ACTUAL_FREQ(new_cluster, new_rate); in bL_cpufreq_set_rate() 147 new_rate = rate; in bL_cpufreq_set_rate() 151 __func__, cpu, old_cluster, new_cluster, new_rate); in bL_cpufreq_set_rate() 153 ret = clk_set_rate(clk[new_cluster], new_rate * 1000); in bL_cpufreq_set_rate() 163 if (clk_get_rate(clk[new_cluster]) != new_rate * 1000) in bL_cpufreq_set_rate() 193 new_rate = find_cluster_maxfreq(old_cluster); in bL_cpufreq_set_rate() 194 new_rate = ACTUAL_FREQ(old_cluster, new_rate); in bL_cpufreq_set_rate() 196 if (new_rate) { in bL_cpufreq_set_rate() [all …]
|
| D | highbank-cpufreq.c | 43 if (clk_data->new_rate > clk_data->old_rate) in hb_cpufreq_clk_notify() 44 while (hb_voltage_change(clk_data->new_rate)) in hb_cpufreq_clk_notify() 48 if (clk_data->new_rate < clk_data->old_rate) in hb_cpufreq_clk_notify() 49 while (hb_voltage_change(clk_data->new_rate)) in hb_cpufreq_clk_notify()
|
| /Linux-v4.19/drivers/clocksource/ |
| D | cadence_ttc_timer.c | 246 if (ndata->new_rate > ndata->old_rate) { in ttc_rate_change_clocksource_cb() 247 factor = DIV_ROUND_CLOSEST(ndata->new_rate, in ttc_rate_change_clocksource_cb() 250 rate_high = ndata->new_rate; in ttc_rate_change_clocksource_cb() 253 ndata->new_rate); in ttc_rate_change_clocksource_cb() 254 rate_low = ndata->new_rate; in ttc_rate_change_clocksource_cb() 277 if (ndata->new_rate < ndata->old_rate) in ttc_rate_change_clocksource_cb() 292 if (ndata->new_rate < ndata->old_rate) in ttc_rate_change_clocksource_cb() 302 if (ndata->new_rate > ndata->old_rate) in ttc_rate_change_clocksource_cb() 312 if (ndata->new_rate < ndata->old_rate) in ttc_rate_change_clocksource_cb() 397 ttc->freq = ndata->new_rate; in ttc_rate_change_clockevent_cb() [all …]
|
| D | timer-sun5i.c | 176 clocksource_register_hz(&cs->clksrc, ndata->new_rate); in sun5i_rate_cb_clksrc() 252 clockevents_update_freq(&ce->clkevt, ndata->new_rate); in sun5i_rate_cb_clkevt() 253 ce->timer.ticks_per_jiffy = DIV_ROUND_UP(ndata->new_rate, HZ); in sun5i_rate_cb_clkevt()
|
| D | mips-gic-timer.c | 118 on_each_cpu(gic_update_frequency, (void *)cnd->new_rate, 1); in gic_clk_notifier()
|
| /Linux-v4.19/drivers/clk/rockchip/ |
| D | clk-cpu.c | 132 rate = rockchip_get_cpuclk_settings(cpuclk, ndata->new_rate); in rockchip_cpuclk_pre_rate_change() 135 __func__, ndata->new_rate); in rockchip_cpuclk_pre_rate_change() 193 rate = rockchip_get_cpuclk_settings(cpuclk, ndata->new_rate); in rockchip_cpuclk_post_rate_change() 196 __func__, ndata->new_rate); in rockchip_cpuclk_post_rate_change() 202 if (ndata->old_rate < ndata->new_rate) in rockchip_cpuclk_post_rate_change() 219 if (ndata->old_rate > ndata->new_rate) in rockchip_cpuclk_post_rate_change() 240 __func__, event, ndata->old_rate, ndata->new_rate); in rockchip_cpuclk_notifier_cb()
|
| D | clk-mmc-phase.c | 189 if (ndata->old_rate <= ndata->new_rate) in rockchip_mmc_clk_rate_notify()
|
| /Linux-v4.19/drivers/clk/samsung/ |
| D | clk-cpu.c | 161 while ((cfg_data->prate * 1000) != ndata->new_rate) { in exynos_cpuclk_pre_rate_change() 190 if (alt_prate > ndata->old_rate || ndata->old_rate > ndata->new_rate) { in exynos_cpuclk_pre_rate_change() 191 unsigned long tmp_rate = min(ndata->old_rate, ndata->new_rate); in exynos_cpuclk_pre_rate_change() 238 while ((cfg_data->prate * 1000) != ndata->new_rate) { in exynos_cpuclk_post_rate_change() 289 while ((cfg_data->prate * 1000) != ndata->new_rate) { in exynos5433_cpuclk_pre_rate_change() 312 if (alt_prate > ndata->old_rate || ndata->old_rate > ndata->new_rate) { in exynos5433_cpuclk_pre_rate_change() 313 unsigned long tmp_rate = min(ndata->old_rate, ndata->new_rate); in exynos5433_cpuclk_pre_rate_change()
|
| /Linux-v4.19/drivers/clk/ |
| D | clk.c | 58 unsigned long new_rate; member 1251 unsigned long old_rate, unsigned long new_rate) in __clk_notify() argument 1258 cnd.new_rate = new_rate; in __clk_notify() 1585 unsigned long new_rate; in __clk_speculate_rates() local 1590 new_rate = clk_recalc(core, parent_rate); in __clk_speculate_rates() 1594 ret = __clk_notify(core, PRE_RATE_CHANGE, core->rate, new_rate); in __clk_speculate_rates() 1603 ret = __clk_speculate_rates(child, new_rate); in __clk_speculate_rates() 1612 static void clk_calc_subtree(struct clk_core *core, unsigned long new_rate, in clk_calc_subtree() argument 1617 core->new_rate = new_rate; in clk_calc_subtree() 1626 child->new_rate = clk_recalc(child, new_rate); in clk_calc_subtree() [all …]
|
| D | clk-si5351.c | 1060 unsigned long new_rate, new_err, err; in si5351_clkout_round_rate() local 1064 new_rate = *parent_rate; in si5351_clkout_round_rate() 1065 err = abs(new_rate - rate); in si5351_clkout_round_rate() 1067 new_rate >>= 1; in si5351_clkout_round_rate() 1068 new_err = abs(new_rate - rate); in si5351_clkout_round_rate() 1090 unsigned long new_rate, new_err, err; in si5351_clkout_set_rate() local 1095 new_rate = parent_rate; in si5351_clkout_set_rate() 1096 err = abs(new_rate - rate); in si5351_clkout_set_rate() 1098 new_rate >>= 1; in si5351_clkout_set_rate() 1099 new_err = abs(new_rate - rate); in si5351_clkout_set_rate()
|
| /Linux-v4.19/arch/arm/kernel/ |
| D | smp_twd.c | 109 static void twd_update_frequency(void *new_rate) in twd_update_frequency() argument 111 twd_timer_rate = *((unsigned long *) new_rate); in twd_update_frequency() 128 (void *)&cnd->new_rate, 1); in twd_rate_change()
|
| /Linux-v4.19/drivers/i2c/busses/ |
| D | i2c-cadence.c | 785 unsigned long input_clk = ndata->new_rate; in cdns_i2c_clk_notifier_cb() 798 if (ndata->new_rate > ndata->old_rate) in cdns_i2c_clk_notifier_cb() 799 cdns_i2c_setclk(ndata->new_rate, id); in cdns_i2c_clk_notifier_cb() 804 id->input_clk = ndata->new_rate; in cdns_i2c_clk_notifier_cb() 806 if (ndata->new_rate < ndata->old_rate) in cdns_i2c_clk_notifier_cb() 807 cdns_i2c_setclk(ndata->new_rate, id); in cdns_i2c_clk_notifier_cb() 811 if (ndata->new_rate > ndata->old_rate) in cdns_i2c_clk_notifier_cb()
|
| D | i2c-rk3x.c | 940 if (i2c->soc_data->calc_timings(ndata->new_rate, &i2c->t, in rk3x_i2c_clk_notifier_cb() 945 if (ndata->new_rate > ndata->old_rate) in rk3x_i2c_clk_notifier_cb() 946 rk3x_i2c_adapt_div(i2c, ndata->new_rate); in rk3x_i2c_clk_notifier_cb() 951 if (ndata->new_rate < ndata->old_rate) in rk3x_i2c_clk_notifier_cb() 952 rk3x_i2c_adapt_div(i2c, ndata->new_rate); in rk3x_i2c_clk_notifier_cb() 956 if (ndata->new_rate > ndata->old_rate) in rk3x_i2c_clk_notifier_cb()
|
| /Linux-v4.19/drivers/net/wireless/intel/iwlegacy/ |
| D | 4965-rs.c | 1092 s32 new_rate, high, low, start_hi; in il4965_rs_get_best_rate() local 1096 new_rate = high = low = start_hi = RATE_INVALID; in il4965_rs_get_best_rate() 1131 new_rate = start_hi; in il4965_rs_get_best_rate() 1135 new_rate = rate; in il4965_rs_get_best_rate() 1150 if (new_rate != RATE_INVALID) in il4965_rs_get_best_rate() 1160 new_rate = rate; in il4965_rs_get_best_rate() 1166 return new_rate; in il4965_rs_get_best_rate() 2376 u32 new_rate) in il4965_rs_fill_link_cmd() argument 2388 il4965_rs_dbgfs_set_mcs(lq_sta, &new_rate, idx); in il4965_rs_fill_link_cmd() 2391 il4965_rs_get_tbl_info_from_mcs(new_rate, lq_sta->band, &tbl_type, in il4965_rs_fill_link_cmd() [all …]
|
| /Linux-v4.19/drivers/usb/serial/ |
| D | cypress_m8.c | 235 static int analyze_baud_rate(struct usb_serial_port *port, speed_t new_rate) in analyze_baud_rate() argument 241 return new_rate; in analyze_baud_rate() 245 return new_rate; in analyze_baud_rate() 264 if (new_rate > 4800) { in analyze_baud_rate() 267 __func__, new_rate); in analyze_baud_rate() 273 if (new_rate <= 600) { in analyze_baud_rate() 279 __func__, new_rate); in analyze_baud_rate() 286 return new_rate; in analyze_baud_rate()
|
| /Linux-v4.19/arch/alpha/kernel/ |
| D | core_marvel.c | 957 unsigned int new_rate = 0; in marvel_agp_configure() local 973 new_rate = 2; in marvel_agp_configure() 982 new_rate = 1; in marvel_agp_configure() 998 if (new_rate) { in marvel_agp_configure() 1002 new_rate); in marvel_agp_configure() 1004 agp->mode.bits.rate = new_rate; in marvel_agp_configure()
|
| /Linux-v4.19/drivers/net/wireless/intel/iwlwifi/dvm/ |
| D | rs.c | 1179 s32 new_rate, high, low, start_hi; in rs_get_best_rate() local 1183 new_rate = high = low = start_hi = IWL_RATE_INVALID; in rs_get_best_rate() 1218 new_rate = start_hi; in rs_get_best_rate() 1222 new_rate = rate; in rs_get_best_rate() 1237 if (new_rate != IWL_RATE_INVALID) in rs_get_best_rate() 1247 new_rate = rate; in rs_get_best_rate() 1253 return new_rate; in rs_get_best_rate() 2894 struct iwl_lq_sta *lq_sta, u32 new_rate) in rs_fill_link_cmd() argument 2908 rs_dbgfs_set_mcs(lq_sta, &new_rate, index); in rs_fill_link_cmd() 2911 rs_get_tbl_info_from_mcs(new_rate, lq_sta->band, in rs_fill_link_cmd() [all …]
|
| /Linux-v4.19/drivers/clk/keystone/ |
| D | sci-clk.c | 173 u64 new_rate; in sci_clk_determine_rate() local 181 &new_rate); in sci_clk_determine_rate() 189 req->rate = new_rate; in sci_clk_determine_rate()
|
| /Linux-v4.19/drivers/md/bcache/ |
| D | writeback.c | 80 uint32_t new_rate; in __update_writeback_rate() local 102 new_rate = clamp_t(int32_t, (proportional_scaled + integral_scaled), in __update_writeback_rate() 107 dc->writeback_rate_change = new_rate - in __update_writeback_rate() 109 atomic_long_set(&dc->writeback_rate.rate, new_rate); in __update_writeback_rate()
|
| /Linux-v4.19/drivers/clk/microchip/ |
| D | clk-core.c | 609 unsigned long new_rate, best_rate = rate; in spll_calc_mult_div() local 620 new_rate = rate64; in spll_calc_mult_div() 621 delta = abs(rate - new_rate); in spll_calc_mult_div() 622 if ((new_rate >= rate) && (delta < best_delta)) { in spll_calc_mult_div() 624 best_rate = new_rate; in spll_calc_mult_div()
|
| /Linux-v4.19/drivers/clk/nxp/ |
| D | clk-lpc32xx.c | 542 unsigned long new_rate; in clk_pll_set_rate() local 550 new_rate = (parent_rate * clk->m_div) / clk->n_div; in clk_pll_set_rate() 555 new_rate = parent_rate / (1 << (clk->p_div)); in clk_pll_set_rate() 559 new_rate = parent_rate; in clk_pll_set_rate() 566 new_rate = (parent_rate * clk->m_div) / clk->n_div; in clk_pll_set_rate() 573 new_rate = (parent_rate * clk->m_div) / in clk_pll_set_rate() 581 if (new_rate != rate) in clk_pll_set_rate()
|
| /Linux-v4.19/drivers/net/wan/ |
| D | ixp4xx_hss.c | 1192 u64 new_rate; in check_clock() local 1195 new_rate = ixp4xx_timer_freq * (u64)(c + 1); in check_clock() 1196 do_div(new_rate, a * (c + 1) + b + 1); in check_clock() 1197 new_diff = abs((u32)new_rate - rate); in check_clock() 1200 *best = new_rate; in check_clock()
|
| /Linux-v4.19/drivers/mmc/host/ |
| D | usdhi6rol0.c | 745 unsigned long new_rate; in usdhi6_clk_set() local 750 new_rate = host->imclk; in usdhi6_clk_set() 753 new_rate = host->imclk / 2; in usdhi6_clk_set() 759 new_rate = host->imclk / div; in usdhi6_clk_set() 762 if (host->rate == new_rate) in usdhi6_clk_set() 765 host->rate = new_rate; in usdhi6_clk_set() 768 rate, (val & 0xff) << 2, new_rate); in usdhi6_clk_set()
|