Lines Matching +full:clk +full:- +full:csr
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * System timer for CSR SiRFprimaII
5 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
15 #include <linux/clk.h>
81 ce->event_handler(ce); in sirfsoc_timer_interrupt()
86 /* read 64-bit timer counter */
138 for (i = 0; i < SIRFSOC_TIMER_REG_CNT - 2; i++) in sirfsoc_clocksource_resume()
141 writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 2], in sirfsoc_clocksource_resume()
143 writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 1], in sirfsoc_clocksource_resume()
178 ce->irq = irq; in sirfsoc_local_timer_starting_cpu()
179 ce->name = "local_timer"; in sirfsoc_local_timer_starting_cpu()
180 ce->features = CLOCK_EVT_FEAT_ONESHOT; in sirfsoc_local_timer_starting_cpu()
181 ce->rating = 200; in sirfsoc_local_timer_starting_cpu()
182 ce->set_state_shutdown = sirfsoc_timer_shutdown; in sirfsoc_local_timer_starting_cpu()
183 ce->set_state_oneshot = sirfsoc_timer_shutdown; in sirfsoc_local_timer_starting_cpu()
184 ce->tick_resume = sirfsoc_timer_shutdown; in sirfsoc_local_timer_starting_cpu()
185 ce->set_next_event = sirfsoc_timer_set_next_event; in sirfsoc_local_timer_starting_cpu()
187 ce->max_delta_ns = clockevent_delta2ns(-2, ce); in sirfsoc_local_timer_starting_cpu()
188 ce->max_delta_ticks = (unsigned long)-2; in sirfsoc_local_timer_starting_cpu()
189 ce->min_delta_ns = clockevent_delta2ns(2, ce); in sirfsoc_local_timer_starting_cpu()
190 ce->min_delta_ticks = 2; in sirfsoc_local_timer_starting_cpu()
191 ce->cpumask = cpumask_of(cpu); in sirfsoc_local_timer_starting_cpu()
193 BUG_ON(request_irq(ce->irq, sirfsoc_timer_interrupt, in sirfsoc_local_timer_starting_cpu()
195 irq_force_affinity(ce->irq, cpumask_of(cpu)); in sirfsoc_local_timer_starting_cpu()
229 struct clk *clk; in sirfsoc_atlas7_timer_init() local
231 clk = of_clk_get(np, 0); in sirfsoc_atlas7_timer_init()
232 BUG_ON(IS_ERR(clk)); in sirfsoc_atlas7_timer_init()
234 BUG_ON(clk_prepare_enable(clk)); in sirfsoc_atlas7_timer_init()
236 atlas7_timer_rate = clk_get_rate(clk); in sirfsoc_atlas7_timer_init()
264 return -ENXIO; in sirfsoc_of_timer_init()
270 return -EINVAL; in sirfsoc_of_timer_init()
276 return -EINVAL; in sirfsoc_of_timer_init()
281 TIMER_OF_DECLARE(sirfsoc_atlas7_timer, "sirf,atlas7-tick", sirfsoc_of_timer_init);