Home
last modified time | relevance | path

Searched refs:clk_rate (Results 1 – 25 of 193) sorted by relevance

12345678

/openbmc/u-boot/drivers/serial/
H A Dserial_uniphier.c97 unsigned int clk_rate; member
101 { .compatible = "socionext,uniphier-ld4", .clk_rate = 36864000 },
102 { .compatible = "socionext,uniphier-pro4", .clk_rate = 73728000 },
103 { .compatible = "socionext,uniphier-sld8", .clk_rate = 80000000 },
104 { .compatible = "socionext,uniphier-pro5", .clk_rate = 73728000 },
105 { .compatible = "socionext,uniphier-pxs2", .clk_rate = 88888888 },
106 { .compatible = "socionext,uniphier-ld6b", .clk_rate = 88888888 },
107 { .compatible = "socionext,uniphier-ld11", .clk_rate = 58823529 },
108 { .compatible = "socionext,uniphier-ld20", .clk_rate = 58823529 },
109 { .compatible = "socionext,uniphier-pxs3", .clk_rate = 58823529 },
[all …]
/openbmc/linux/drivers/memory/
H A Dti-aemif.c123 unsigned long clk_rate; member
179 unsigned long clk_rate = aemif->clk_rate; in aemif_config_abus() local
185 ta = aemif_calc_rate(pdev, data->ta, clk_rate, TA_MAX); in aemif_config_abus()
186 rhold = aemif_calc_rate(pdev, data->rhold, clk_rate, RHOLD_MAX); in aemif_config_abus()
187 rstrobe = aemif_calc_rate(pdev, data->rstrobe, clk_rate, RSTROBE_MAX); in aemif_config_abus()
188 rsetup = aemif_calc_rate(pdev, data->rsetup, clk_rate, RSETUP_MAX); in aemif_config_abus()
189 whold = aemif_calc_rate(pdev, data->whold, clk_rate, WHOLD_MAX); in aemif_config_abus()
190 wstrobe = aemif_calc_rate(pdev, data->wstrobe, clk_rate, WSTROBE_MAX); in aemif_config_abus()
191 wsetup = aemif_calc_rate(pdev, data->wsetup, clk_rate, WSETUP_MAX); in aemif_config_abus()
217 static inline int aemif_cycles_to_nsec(int val, unsigned long clk_rate) in aemif_cycles_to_nsec() argument
[all …]
/openbmc/linux/drivers/ufs/host/
H A Dufs-mediatek-trace.h32 TP_PROTO(const char *name, bool scale_up, unsigned long clk_rate),
33 TP_ARGS(name, scale_up, clk_rate),
38 __field(unsigned long, clk_rate)
44 __entry->clk_rate = clk_rate;
50 __entry->clk_rate)
/openbmc/linux/drivers/char/hw_random/
H A Dks-sa-rng.c93 static unsigned int cycles_to_ns(unsigned long clk_rate, unsigned int cycles) in cycles_to_ns() argument
96 cycles, clk_rate); in cycles_to_ns()
99 static unsigned int startup_delay_ns(unsigned long clk_rate) in startup_delay_ns() argument
102 return cycles_to_ns(clk_rate, BIT(24)); in startup_delay_ns()
103 return cycles_to_ns(clk_rate, 256 * TRNG_DEF_STARTUP_CYCLES); in startup_delay_ns()
106 static unsigned int refill_delay_ns(unsigned long clk_rate) in refill_delay_ns() argument
109 return cycles_to_ns(clk_rate, BIT(24)); in refill_delay_ns()
110 return cycles_to_ns(clk_rate, 256 * TRNG_DEF_MAX_REFILL_CYCLES); in refill_delay_ns()
118 unsigned long clk_rate = clk_get_rate(ks_sa_rng->clk); in ks_sa_rng_init() local
147 ks_sa_rng->refill_delay_ns = refill_delay_ns(clk_rate); in ks_sa_rng_init()
[all …]
/openbmc/linux/drivers/clocksource/
H A Dtimer-microchip-pit64b.c239 static void __init mchp_pit64b_pres_compute(u32 *pres, u32 clk_rate, in mchp_pit64b_pres_compute() argument
245 tmp = clk_rate / (*pres + 1); in mchp_pit64b_pres_compute()
348 u32 clk_rate) in mchp_pit64b_init_clksrc() argument
374 ret = clocksource_register_hz(&cs->clksrc, clk_rate); in mchp_pit64b_init_clksrc()
385 sched_clock_register(mchp_pit64b_sched_read_clk, 64, clk_rate); in mchp_pit64b_init_clksrc()
388 mchp_pit64b_dt.freq = clk_rate; in mchp_pit64b_init_clksrc()
395 u32 clk_rate, u32 irq) in mchp_pit64b_init_clkevt() argument
404 mchp_pit64b_ce_cycles = DIV_ROUND_CLOSEST(clk_rate, HZ); in mchp_pit64b_init_clkevt()
428 clockevents_config_and_register(&ce->clkevt, clk_rate, 1, ULONG_MAX); in mchp_pit64b_init_clkevt()
437 unsigned long clk_rate; in mchp_pit64b_dt_init_timer() local
[all …]
H A Dtimer-vf-pit.c153 unsigned long clk_rate; in pit_timer_init() local
182 clk_rate = clk_get_rate(pit_clk); in pit_timer_init()
183 cycle_per_jiffy = clk_rate / (HZ); in pit_timer_init()
188 ret = pit_clocksource_init(clk_rate); in pit_timer_init()
192 return pit_clockevent_init(clk_rate, irq); in pit_timer_init()
/openbmc/linux/drivers/mfd/
H A Dintel-lpss-acpi.c32 .clk_rate = 120000000,
46 .clk_rate = 120000000,
62 .clk_rate = 120000000,
77 .clk_rate = 100000000,
93 .clk_rate = 133000000,
109 .clk_rate = 133000000,
123 .clk_rate = 120000000,
128 .clk_rate = 216000000,
/openbmc/linux/drivers/watchdog/
H A Dloongson1_wdt.c29 unsigned long clk_rate; member
51 counts = drvdata->clk_rate * min(timeout, max_hw_heartbeat); in ls1x_wdt_set_timeout()
106 unsigned long clk_rate; in ls1x_wdt_probe() local
121 clk_rate = clk_get_rate(drvdata->clk); in ls1x_wdt_probe()
122 if (!clk_rate) in ls1x_wdt_probe()
124 drvdata->clk_rate = clk_rate; in ls1x_wdt_probe()
131 ls1x_wdt->max_hw_heartbeat_ms = U32_MAX / clk_rate * 1000; in ls1x_wdt_probe()
H A Dimgpdc_wdt.c116 unsigned long clk_rate = clk_get_rate(wdt->wdt_clk); in __pdc_wdt_set_timeout() local
120 val |= order_base_2(wdt->wdt_dev.timeout * clk_rate) - 1; in __pdc_wdt_set_timeout()
183 unsigned long clk_rate; in pdc_wdt_probe() local
207 clk_rate = clk_get_rate(pdc_wdt->wdt_clk); in pdc_wdt_probe()
208 if (clk_rate == 0) { in pdc_wdt_probe()
213 if (order_base_2(clk_rate) > PDC_WDT_CONFIG_DELAY_MASK + 1) { in pdc_wdt_probe()
218 if (order_base_2(clk_rate) == 0) in pdc_wdt_probe()
227 do_div(div, clk_rate); in pdc_wdt_probe()
H A Drenesas_wdt.c37 DIV_ROUND_UP((d) * (p)->clk_rate, clk_divs[(p)->cks])
40 #define DIV_BY_CLKS_PER_SEC(p, d) ((d) * clk_divs[(p)->cks] / (p)->clk_rate)
52 unsigned long clk_rate; member
80 delay = DIV_ROUND_UP(cycles * 1000000, priv->clk_rate); in rwdt_wait_cycles()
143 udelay(DIV_ROUND_UP(2 * 1000000, priv->clk_rate)); in rwdt_restart()
155 udelay(DIV_ROUND_UP(2 * 1000000, priv->clk_rate)); in rwdt_restart()
237 priv->clk_rate = clk_get_rate(priv->clk); in rwdt_probe()
242 if (!priv->clk_rate) { in rwdt_probe()
248 clks_per_sec = priv->clk_rate / clk_divs[i]; in rwdt_probe()
H A Dapple_wdt.c59 unsigned long clk_rate; member
100 writel_relaxed(wdt->clk_rate * s, wdt->regs + APPLE_WDT_WD1_BITE_TIME); in apple_wdt_set_timeout()
115 return (reset_time - cur_time) / wdt->clk_rate; in apple_wdt_get_timeleft()
172 wdt->clk_rate = clk_get_rate(clk); in apple_wdt_probe()
173 if (!wdt->clk_rate) in apple_wdt_probe()
178 wdt->wdd.max_timeout = U32_MAX / wdt->clk_rate; in apple_wdt_probe()
H A Dlantiq_wdt.c65 unsigned long clk_rate; member
104 timeout = wdt->timeout * priv->clk_rate; in ltq_wdt_start()
132 timeout = wdt->timeout * priv->clk_rate; in ltq_wdt_ping()
148 return do_div(timeout, priv->clk_rate); in ltq_wdt_get_timeleft()
220 priv->clk_rate = clk_get_rate(clk) / LTQ_WDT_DIVIDER; in ltq_wdt_probe()
221 if (!priv->clk_rate) { in ltq_wdt_probe()
231 wdt->max_timeout = LTQ_WDT_CR_MAX_TIMEOUT / priv->clk_rate; in ltq_wdt_probe()
H A Dorion_wdt.c74 unsigned long clk_rate; member
93 dev->clk_rate = clk_get_rate(dev->clk); in orion_wdt_clock_init()
116 dev->clk_rate = clk_get_rate(dev->clk) / WDT_A370_RATIO; in armada370_wdt_clock_init()
136 dev->clk_rate = clk_get_rate(dev->clk); in armada375_wdt_clock_init()
155 dev->clk_rate = clk_get_rate(dev->clk) / WDT_A370_RATIO; in armada375_wdt_clock_init()
179 dev->clk_rate = clk_get_rate(dev->clk); in armadaxp_wdt_clock_init()
187 writel(dev->clk_rate * wdt_dev->timeout, in orion_wdt_ping()
190 writel(dev->clk_rate * (wdt_dev->timeout - wdt_dev->pretimeout), in orion_wdt_ping()
202 writel(dev->clk_rate * wdt_dev->timeout, in armada375_start()
205 writel(dev->clk_rate * (wdt_dev->timeout - wdt_dev->pretimeout), in armada375_start()
[all …]
H A Dlpc18xx_wdt.c55 unsigned long clk_rate; member
107 val = DIV_ROUND_UP(lpc18xx_wdt->wdt_dev.timeout * lpc18xx_wdt->clk_rate, in __lpc18xx_wdt_set_timeout()
129 return (val * LPC18XX_WDT_CLK_DIV) / lpc18xx_wdt->clk_rate; in lpc18xx_wdt_get_timeleft()
226 lpc18xx_wdt->clk_rate = clk_get_rate(lpc18xx_wdt->wdt_clk); in lpc18xx_wdt_probe()
227 if (lpc18xx_wdt->clk_rate == 0) { in lpc18xx_wdt_probe()
236 LPC18XX_WDT_CLK_DIV, lpc18xx_wdt->clk_rate); in lpc18xx_wdt_probe()
239 LPC18XX_WDT_CLK_DIV) / lpc18xx_wdt->clk_rate; in lpc18xx_wdt_probe()
/openbmc/linux/drivers/pwm/
H A Dpwm-omap-dmtimer.c85 static u32 pwm_omap_dmtimer_get_clock_cycles(unsigned long clk_rate, int ns) in pwm_omap_dmtimer_get_clock_cycles() argument
87 return DIV_ROUND_CLOSEST_ULL((u64)clk_rate * ns, NSEC_PER_SEC); in pwm_omap_dmtimer_get_clock_cycles()
158 unsigned long clk_rate; in pwm_omap_dmtimer_config() local
174 clk_rate = clk_get_rate(fclk); in pwm_omap_dmtimer_config()
175 if (!clk_rate) { in pwm_omap_dmtimer_config()
180 dev_dbg(chip->dev, "clk rate: %luHz\n", clk_rate); in pwm_omap_dmtimer_config()
198 period_cycles = pwm_omap_dmtimer_get_clock_cycles(clk_rate, period_ns); in pwm_omap_dmtimer_config()
199 duty_cycles = pwm_omap_dmtimer_get_clock_cycles(clk_rate, duty_ns); in pwm_omap_dmtimer_config()
204 period_ns, clk_rate); in pwm_omap_dmtimer_config()
211 duty_ns, clk_rate); in pwm_omap_dmtimer_config()
[all …]
H A Dpwm-sunplus.c61 u64 clk_rate; in sunplus_pwm_apply() local
78 clk_rate = clk_get_rate(priv->clk); in sunplus_pwm_apply()
85 if (clk_rate > (u64)SP7021_PWM_FREQ_SCALER * NSEC_PER_SEC) in sunplus_pwm_apply()
92 dd_freq = mul_u64_u64_div_u64(clk_rate, state->period, (u64)SP7021_PWM_FREQ_SCALER in sunplus_pwm_apply()
117 duty = mul_u64_u64_div_u64(state->duty_cycle, clk_rate, in sunplus_pwm_apply()
133 u64 clk_rate; in sunplus_pwm_get_state() local
138 clk_rate = clk_get_rate(priv->clk); in sunplus_pwm_get_state()
147 * NSEC_PER_SEC, clk_rate); in sunplus_pwm_get_state()
152 clk_rate); in sunplus_pwm_get_state()
H A Dpwm-keembay.c97 unsigned long clk_rate; in keembay_pwm_get_state() local
100 clk_rate = clk_get_rate(priv->clk); in keembay_pwm_get_state()
113 state->duty_cycle = DIV_ROUND_UP_ULL(high, clk_rate); in keembay_pwm_get_state()
114 state->period = DIV_ROUND_UP_ULL(high + low, clk_rate); in keembay_pwm_get_state()
126 unsigned long clk_rate; in keembay_pwm_apply() local
154 clk_rate = clk_get_rate(priv->clk); in keembay_pwm_apply()
155 div = clk_rate * state->duty_cycle; in keembay_pwm_apply()
161 div = clk_rate * state->period; in keembay_pwm_apply()
H A Dpwm-sun4i.c115 u64 clk_rate, tmp; in sun4i_pwm_get_state() local
119 clk_rate = clk_get_rate(sun4i_pwm->clk); in sun4i_pwm_get_state()
120 if (!clk_rate) in sun4i_pwm_get_state()
132 state->period = DIV_ROUND_UP_ULL(NSEC_PER_SEC, clk_rate); in sun4i_pwm_get_state()
162 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate); in sun4i_pwm_get_state()
165 state->period = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate); in sun4i_pwm_get_state()
175 u64 clk_rate, div = 0; in sun4i_pwm_calculate() local
178 clk_rate = clk_get_rate(sun4i_pwm->clk); in sun4i_pwm_calculate()
182 (state->period * clk_rate >= NSEC_PER_SEC) && in sun4i_pwm_calculate()
183 (state->period * clk_rate < 2 * NSEC_PER_SEC) && in sun4i_pwm_calculate()
[all …]
H A Dpwm-microchip-core.c134 static u64 mchp_core_pwm_calc_duty(const struct pwm_state *state, u64 clk_rate, in mchp_core_pwm_calc_duty() argument
146 duty_steps = mul_u64_u64_div_u64(state->duty_cycle, clk_rate, tmp); in mchp_core_pwm_calc_duty()
185 static int mchp_core_pwm_calc_period(const struct pwm_state *state, unsigned long clk_rate, in mchp_core_pwm_calc_period() argument
212 tmp = mul_u64_u64_div_u64(state->period, clk_rate, NSEC_PER_SEC); in mchp_core_pwm_calc_period()
279 unsigned long clk_rate; in mchp_core_pwm_apply_locked() local
294 clk_rate = clk_get_rate(mchp_core_pwm->clk); in mchp_core_pwm_apply_locked()
295 if (clk_rate >= NSEC_PER_SEC) in mchp_core_pwm_apply_locked()
298 ret = mchp_core_pwm_calc_period(state, clk_rate, &prescale, &period_steps); in mchp_core_pwm_apply_locked()
338 duty_steps = mchp_core_pwm_calc_duty(state, clk_rate, prescale, period_steps); in mchp_core_pwm_apply_locked()
/openbmc/linux/drivers/gpu/drm/msm/disp/dpu1/
H A Ddpu_core_perf.c282 u64 clk_rate; in _dpu_core_perf_get_core_clk_rate() local
292 clk_rate = 0; in _dpu_core_perf_get_core_clk_rate()
296 clk_rate = max(dpu_cstate->new_perf.core_clk_rate, in _dpu_core_perf_get_core_clk_rate()
297 clk_rate); in _dpu_core_perf_get_core_clk_rate()
301 return clk_rate; in _dpu_core_perf_get_core_clk_rate()
309 u64 clk_rate = 0; in dpu_core_perf_crtc_update() local
380 clk_rate = _dpu_core_perf_get_core_clk_rate(kms); in dpu_core_perf_crtc_update()
382 DRM_DEBUG_ATOMIC("clk:%llu\n", clk_rate); in dpu_core_perf_crtc_update()
384 trace_dpu_core_perf_update_clk(kms->dev, !crtc->enabled, clk_rate); in dpu_core_perf_crtc_update()
386 clk_rate = min(clk_rate, kms->perf.max_core_clk_rate); in dpu_core_perf_crtc_update()
[all …]
/openbmc/linux/arch/m68k/include/asm/
H A Dmcfclk.h32 #define DEFINE_CLK(clk_bank, clk_name, clk_slot, clk_rate) \ argument
35 .rate = clk_rate, \
42 #define DEFINE_CLK(clk_ref, clk_name, clk_rate) \ argument
44 .rate = clk_rate, \
/openbmc/u-boot/drivers/phy/
H A Dphy-stm32-usbphyc.c64 void stm32_usbphyc_get_pll_params(u32 clk_rate, struct pll_params *pll_params) in stm32_usbphyc_get_pll_params() argument
80 do_div(ndiv, (clk_rate * 2)); in stm32_usbphyc_get_pll_params()
84 do_div(frac, (clk_rate * 2)); in stm32_usbphyc_get_pll_params()
92 u32 clk_rate = clk_get_rate(&usbphyc->clk); in stm32_usbphyc_pll_init() local
95 if ((clk_rate < PLL_INFF_MIN_RATE) || (clk_rate > PLL_INFF_MAX_RATE)) { in stm32_usbphyc_pll_init()
97 __func__, clk_rate); in stm32_usbphyc_pll_init()
101 stm32_usbphyc_get_pll_params(clk_rate, &pll_params); in stm32_usbphyc_pll_init()
115 clk_rate, pll_params.ndiv, pll_params.frac); in stm32_usbphyc_pll_init()
/openbmc/u-boot/drivers/clk/at91/
H A Dclk-plladiv.c24 ulong clk_rate; in at91_plladiv_clk_get_rate() local
31 clk_rate = clk_get_rate(&source); in at91_plladiv_clk_get_rate()
33 clk_rate /= 2; in at91_plladiv_clk_get_rate()
35 return clk_rate; in at91_plladiv_clk_get_rate()
/openbmc/u-boot/drivers/timer/
H A Datmel_pit_timer.c44 ulong clk_rate; in atmel_pit_probe() local
51 clk_rate = clk_get_rate(&clk); in atmel_pit_probe()
52 if (!clk_rate) in atmel_pit_probe()
55 uc_priv->clock_rate = clk_rate / 16; in atmel_pit_probe()
/openbmc/u-boot/drivers/adc/
H A Drockchip-saradc.c32 unsigned long clk_rate; member
109 ret = clk_set_rate(&clk, priv->data->clk_rate); in rockchip_saradc_probe()
149 .clk_rate = 1000000,
155 .clk_rate = 50000,
161 .clk_rate = 1000000,

12345678