Lines Matching refs:freq
179 static int __init ftm_clockevent_init(unsigned long freq, int irq) in ftm_clockevent_init() argument
199 freq / (1 << priv->ps), in ftm_clockevent_init()
207 static int __init ftm_clocksource_init(unsigned long freq) in ftm_clocksource_init() argument
216 sched_clock_register(ftm_read_sched_clock, 16, freq / (1 << priv->ps)); in ftm_clocksource_init()
218 freq / (1 << priv->ps), 300, 16, in ftm_clocksource_init()
263 long freq; in ftm_clk_init() local
265 freq = __ftm_clk_init(np, "ftm-evt-counter-en", "ftm-evt"); in ftm_clk_init()
266 if (freq <= 0) in ftm_clk_init()
269 freq = __ftm_clk_init(np, "ftm-src-counter-en", "ftm-src"); in ftm_clk_init()
270 if (freq <= 0) in ftm_clk_init()
273 return freq; in ftm_clk_init()
276 static int __init ftm_calc_closest_round_cyc(unsigned long freq) in ftm_calc_closest_round_cyc() argument
285 priv->periodic_cyc = DIV_ROUND_CLOSEST(freq, in ftm_calc_closest_round_cyc()
300 unsigned long freq; in ftm_timer_init() local
329 freq = ftm_clk_init(np); in ftm_timer_init()
330 if (!freq) in ftm_timer_init()
333 ret = ftm_calc_closest_round_cyc(freq); in ftm_timer_init()
337 ret = ftm_clocksource_init(freq); in ftm_timer_init()
341 ret = ftm_clockevent_init(freq, irq); in ftm_timer_init()