Lines Matching +full:interrupt +full:- +full:clk
1 // SPDX-License-Identifier: GPL-2.0-only
3 * arch/arm/mach-pxa/time.c
5 * PXA clocksource, clockevents, and OST interrupt handlers.
14 #include <linux/interrupt.h>
15 #include <linux/clk.h>
34 #define OIER 0x1C /* OS Timer Interrupt Enable Register */
41 #define OIER_E0 (1 << 0) /* Interrupt enable channel 0 */
73 c->event_handler(c); in pxa_ost0_interrupt()
88 return (signed)(next - oscr) <= MIN_OSCR_DELTA ? -ETIME : 0; in pxa_osmr0_set_next_event()
117 * the one-shot timer interrupt. We adjust OSMR0 in preference in pxa_timer_resume()
120 if (osmr[0] - oscr < MIN_OSCR_DELTA) in pxa_timer_resume()
179 struct clk *clk; in pxa_timer_dt_init() local
186 return -ENXIO; in pxa_timer_dt_init()
189 clk = of_clk_get(np, 0); in pxa_timer_dt_init()
190 if (IS_ERR(clk)) { in pxa_timer_dt_init()
191 pr_crit("%pOFn: unable to get clk\n", np); in pxa_timer_dt_init()
192 return PTR_ERR(clk); in pxa_timer_dt_init()
195 ret = clk_prepare_enable(clk); in pxa_timer_dt_init()
201 /* we are only interested in OS-timer0 irq */ in pxa_timer_dt_init()
204 pr_crit("%pOFn: unable to parse OS-timer0 irq\n", np); in pxa_timer_dt_init()
205 return -EINVAL; in pxa_timer_dt_init()
208 return pxa_timer_common_init(irq, clk_get_rate(clk)); in pxa_timer_dt_init()
210 TIMER_OF_DECLARE(pxa_timer, "marvell,pxa-timer", pxa_timer_dt_init);
213 * Legacy timer init for non device-tree boards.
217 struct clk *clk; in pxa_timer_nodt_init() local
220 clk = clk_get(NULL, "OSTIMER0"); in pxa_timer_nodt_init()
221 if (clk && !IS_ERR(clk)) { in pxa_timer_nodt_init()
222 clk_prepare_enable(clk); in pxa_timer_nodt_init()
223 pxa_timer_common_init(irq, clk_get_rate(clk)); in pxa_timer_nodt_init()
225 pr_crit("%s: unable to get clk\n", __func__); in pxa_timer_nodt_init()