Lines Matching +full:interrupt +full:- +full:clk
1 // SPDX-License-Identifier: GPL-2.0-only
10 #include <linux/clk.h>
18 #include <linux/interrupt.h>
28 static struct clk *twd_clk;
37 static int twd_shutdown(struct clock_event_device *clk) in twd_shutdown() argument
43 static int twd_set_oneshot(struct clock_event_device *clk) in twd_set_oneshot() argument
51 static int twd_set_periodic(struct clock_event_device *clk) in twd_set_periodic() argument
77 * local_timer_ack: checks for a local timer interrupt.
79 * If a local timer interrupt has occurred, acknowledge and return 1.
94 struct clock_event_device *clk = raw_cpu_ptr(twd_evt); in twd_timer_stop() local
96 twd_shutdown(clk); in twd_timer_stop()
97 disable_percpu_irq(clk->irq); in twd_timer_stop()
118 * frequency. The timer is local to a cpu, so cross-call to the in twd_rate_change()
123 (void *)&cnd->new_rate, 1); in twd_rate_change()
162 /* enable, no interrupt or reload */ in twd_calibrate_rate()
173 twd_timer_rate = (0xFFFFFFFFU - count) * (HZ / 5); in twd_calibrate_rate()
185 evt->event_handler(evt); in twd_handler()
221 struct clock_event_device *clk = raw_cpu_ptr(twd_evt); in twd_timer_setup() local
230 clockevents_register_device(clk); in twd_timer_setup()
231 enable_percpu_irq(clk->irq, 0); in twd_timer_setup()
244 clk->name = "local_timer"; in twd_timer_setup()
245 clk->features = twd_features; in twd_timer_setup()
246 clk->rating = 350; in twd_timer_setup()
247 clk->set_state_shutdown = twd_shutdown; in twd_timer_setup()
248 clk->set_state_periodic = twd_set_periodic; in twd_timer_setup()
249 clk->set_state_oneshot = twd_set_oneshot; in twd_timer_setup()
250 clk->tick_resume = twd_shutdown; in twd_timer_setup()
251 clk->set_next_event = twd_set_next_event; in twd_timer_setup()
252 clk->irq = twd_ppi; in twd_timer_setup()
253 clk->cpumask = cpumask_of(cpu); in twd_timer_setup()
255 clockevents_config_and_register(clk, twd_timer_rate, in twd_timer_setup()
257 enable_percpu_irq(clk->irq, 0); in twd_timer_setup()
278 err = -ENOMEM; in twd_local_timer_common_register()
284 pr_err("twd: can't register interrupt %d (%d)\n", twd_ppi, err); in twd_local_timer_common_register()
293 if (!of_property_read_bool(np, "always-on")) in twd_local_timer_common_register()
322 err = -EINVAL; in twd_local_timer_of_register()
328 err = -ENOMEM; in twd_local_timer_of_register()
338 TIMER_OF_DECLARE(arm_twd_a9, "arm,cortex-a9-twd-timer", twd_local_timer_of_register);
339 TIMER_OF_DECLARE(arm_twd_a5, "arm,cortex-a5-twd-timer", twd_local_timer_of_register);
340 TIMER_OF_DECLARE(arm_twd_11mp, "arm,arm11mp-twd-timer", twd_local_timer_of_register);