Lines Matching +full:local +full:- +full:timers

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2016-17 Synopsys, Inc. (www.synopsys.com)
4 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
7 /* ARC700 has two 32bit independent prog Timers: TIMER0 and TIMER1, Each can be
11 * ARCv2 based HS38 cores have RTC (in-core) and GFRC (inside ARConnect/MCIP)
18 #include <linux/clk-provider.h>
26 #include <soc/arc/timers.h>
65 * MCIP_CMD/MCIP_READBACK however micro-architecturally there's in arc_read_gfrc()
70 * trying to access two different sub-components (like GFRC, in arc_read_gfrc()
71 * inter-core interrupt, etc...). HW also supports simultaneously in arc_read_gfrc()
73 * That's why it is safe to disable hard interrupts on the local CPU in arc_read_gfrc()
110 pr_warn("Global-64-bit-Ctr clocksource not detected\n"); in arc_cs_setup_gfrc()
111 return -ENXIO; in arc_cs_setup_gfrc()
122 TIMER_OF_DECLARE(arc_gfrc, "snps,archs-timer-gfrc", arc_cs_setup_gfrc);
136 * - interrupt/exception taken between the two reads in arc_read_rtc()
137 * - high increments after low has been read in arc_read_rtc()
168 pr_warn("Local-64-bit-Ctr clocksource not detected\n"); in arc_cs_setup_rtc()
169 return -ENXIO; in arc_cs_setup_rtc()
172 /* Local to CPU hence not usable in SMP */ in arc_cs_setup_rtc()
174 pr_warn("Local-64-bit-Ctr not usable in SMP\n"); in arc_cs_setup_rtc()
175 return -EINVAL; in arc_cs_setup_rtc()
188 TIMER_OF_DECLARE(arc_rtc, "snps,archs-timer-rtc", arc_cs_setup_rtc);
218 /* Local to CPU hence not usable in SMP */ in arc_cs_setup_timer1()
220 return -EINVAL; in arc_cs_setup_timer1()
262 * At X Hz, 1 sec = 1000ms -> X cycles; in arc_clkevent_set_periodic()
263 * 10ms -> X / 100 cycles in arc_clkevent_set_periodic()
289 * - For ARC700, any write to CTRL reg ACKs it, so just rewrite in timer_irq_handler()
291 * - For HS3x, it is a bit subtle. On taken count-down interrupt, in timer_irq_handler()
295 * 2. Re-arm interrupt if periodic by writing to IE bit [0] in timer_irq_handler()
299 evt->event_handler(evt); in timer_irq_handler()
309 evt->cpumask = cpumask_of(smp_processor_id()); in arc_timer_starting_cpu()
333 return -EINVAL; in arc_clockevent_setup()
342 "Timer0 (per-cpu-tick)", evt); in arc_clockevent_setup()
373 TIMER_OF_DECLARE(arc_clkevt, "snps,arc-timer", arc_of_timer_init);