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.
14 #include <linux/clk.h>
68 ce->event_handler(ce); in sirfsoc_timer_interrupt()
73 /* read 64-bit timer counter */
78 /* latch the 64-bit timer counter */ in sirfsoc_timer_read()
102 return next - now > delta ? -ETIME : 0; in sirfsoc_timer_set_next_event()
139 for (i = 0; i < SIRFSOC_TIMER_REG_CNT - 2; i++) in sirfsoc_clocksource_resume()
143 writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 2], in sirfsoc_clocksource_resume()
145 writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 1], in sirfsoc_clocksource_resume()
178 2, -2); in sirfsoc_clockevent_init()
186 struct clk *clk; in sirfsoc_prima2_timer_init() local
189 clk = of_clk_get(np, 0); in sirfsoc_prima2_timer_init()
190 if (IS_ERR(clk)) { in sirfsoc_prima2_timer_init()
192 return PTR_ERR(clk); in sirfsoc_prima2_timer_init()
195 ret = clk_prepare_enable(clk); in sirfsoc_prima2_timer_init()
201 rate = clk_get_rate(clk); in sirfsoc_prima2_timer_init()
205 return -EINVAL; in sirfsoc_prima2_timer_init()
211 return -ENXIO; in sirfsoc_prima2_timer_init()
216 writel_relaxed(rate / PRIMA2_CLOCK_FREQ / 2 - 1, in sirfsoc_prima2_timer_init()
242 "sirf,prima2-tick", sirfsoc_prima2_timer_init);