Home
last modified time | relevance | path

Searched full:clocksource (Results 1 – 25 of 392) sorted by relevance

12345678910>>...16

/Linux-v5.10/include/linux/
Dclocksource.h2 /* linux/include/linux/clocksource.h
6 * If you are not a clocksource, or timekeeping code, you should
23 struct clocksource;
28 #include <asm/clocksource.h>
31 #include <vdso/clocksource.h>
34 * struct clocksource - hardware abstraction for a free running counter
38 * @read: Returns a cycle value, passes clocksource as argument
43 * @max_idle_ns: Maximum idle time permitted by the clocksource (nsecs)
48 * @name: Pointer to clocksource name
53 * to assign your clocksource a rating
[all …]
/Linux-v5.10/kernel/time/
Dclocksource.c3 * This file contains the functions which manage clocksource drivers.
11 #include <linux/clocksource.h>
76 /*[Clocksource internal variables]---------
78 * currently selected clocksource.
86 * Name of the user-specified clocksource.
88 static struct clocksource *curr_clocksource;
89 static struct clocksource *suspend_clocksource;
101 static struct clocksource *watchdog;
119 static void __clocksource_change_rating(struct clocksource *cs, int rating);
145 static void __clocksource_unstable(struct clocksource *cs) in __clocksource_unstable()
[all …]
Djiffies.c3 * This file contains the jiffies based clocksource.
7 #include <linux/clocksource.h>
35 static u64 jiffies_read(struct clocksource *cs) in jiffies_read()
41 * The Jiffies based clocksource is the lowest common
51 static struct clocksource clocksource_jiffies = {
88 struct clocksource * __init __weak clocksource_default_clock(void) in clocksource_default_clock()
93 static struct clocksource refined_jiffies;
/Linux-v5.10/drivers/clocksource/
DKconfig164 where TIMER0 serves as clockevent and TIMER1 serves as clocksource.
180 bool "Nomakdik clocksource driver" if COMPILE_TEST
189 bool "Clocksource PRCMU Timer" if COMPILE_TEST
192 Use the always on PRCMU Timer as clocksource.
246 bool "Clocksource for Energy Micro's EFM32 SoCs" if !ARCH_EFM32
255 bool "Clocksource for LPC32XX" if COMPILE_TEST
261 Support for the LPC32XX clocksource.
264 bool "Clocksource for Pistachio SoC" if COMPILE_TEST
268 Enables the clocksource for the Pistachio SoC.
271 bool "Texas Instruments 32.768 Hz Clocksource" if COMPILE_TEST
[all …]
Dmmio.c3 * Generic MMIO clocksource support
5 #include <linux/clocksource.h>
12 struct clocksource clksrc;
15 static inline struct clocksource_mmio *to_mmio_clksrc(struct clocksource *c) in to_mmio_clksrc()
20 u64 clocksource_mmio_readl_up(struct clocksource *c) in clocksource_mmio_readl_up()
25 u64 clocksource_mmio_readl_down(struct clocksource *c) in clocksource_mmio_readl_down()
30 u64 clocksource_mmio_readw_up(struct clocksource *c) in clocksource_mmio_readw_up()
35 u64 clocksource_mmio_readw_down(struct clocksource *c) in clocksource_mmio_readw_down()
41 * clocksource_mmio_init - Initialize a simple mmio based clocksource
43 * @name: Name of the clocksource
[all …]
Dhyperv_timer.c4 * Clocksource driver for the synthetic counter and timers
17 #include <linux/clocksource.h>
21 #include <clocksource/hyperv_timer.h>
38 * interrupts are enabled for other clocksource drivers.
236 * clocksource driver just to set the sint in the legacy case. in hv_stimer_legacy_init()
306 * The Hyper-V clocksource ratings of 250 are chosen to be below the
307 * TSC clocksource rating of 300. In configurations where Hyper-V offers
308 * an InvariantTSC, the TSC is not marked "unstable", so the TSC clocksource
311 * "unstable", so no TSC clocksource is created and the selected Hyper-V
312 * clocksource will be the default.
[all …]
Dtimer-ti-dm-systimer.c3 #include <linux/clocksource.h>
16 #include <clocksource/timer-ti-dm.h>
29 static u32 clocksource; variable
59 struct clocksource dev;
147 * typically no use for a dmtimer clocksource if the 32 KiHz counter is
222 * clockevent or clocksource depending if the counter_32k is available on the
230 * clock as the clocksource, and any available dmtimer as clockevent.
232 * For am437x, we are using am335x style dmtimer clocksource. It is unclear
249 /* Quirk am437x using am335x style dmtimer clocksource */ in dmtimer_systimer_assign_alwon()
274 /* Usually no need for dmtimer clocksource if we have counter32 */ in dmtimer_systimer_assign_alwon()
[all …]
Dtimer-vt8500.c17 #include <linux/clocksource.h>
43 static u64 vt8500_timer_read(struct clocksource *cs) in vt8500_timer_read()
53 static struct clocksource clocksource = { variable
65 u64 alarm = clocksource.read(&clocksource) + cycles; in vt8500_timer_set_next_event()
71 if ((signed)(alarm - clocksource.read(&clocksource)) <= MIN_OSCR_DELTA) in vt8500_timer_set_next_event()
126 ret = clocksource_register_hz(&clocksource, VT8500_TIMER_HZ); in vt8500_timer_init()
129 __func__, clocksource.name); in vt8500_timer_init()
Dh8300_timer16.c10 #include <linux/clocksource.h>
27 struct clocksource cs;
71 static inline struct timer16_priv *cs_to_priv(struct clocksource *cs) in cs_to_priv()
76 static u64 timer16_clocksource_read(struct clocksource *cs) in timer16_clocksource_read()
87 static int timer16_enable(struct clocksource *cs) in timer16_enable()
103 static void timer16_disable(struct clocksource *cs) in timer16_disable()
139 pr_err("failed to get clock for clocksource\n"); in h8300_16timer_init()
146 pr_err("failed to map registers for clocksource\n"); in h8300_16timer_init()
152 pr_err("failed to map registers for clocksource\n"); in h8300_16timer_init()
174 pr_err("failed to request irq %d of clocksource\n", irq); in h8300_16timer_init()
Dh8300_tpu.c12 #include <linux/clocksource.h>
26 struct clocksource cs;
63 static inline struct tpu_priv *cs_to_priv(struct clocksource *cs) in cs_to_priv()
68 static u64 tpu_clocksource_read(struct clocksource *cs) in tpu_clocksource_read()
82 static int tpu_clocksource_enable(struct clocksource *cs) in tpu_clocksource_enable()
97 static void tpu_clocksource_disable(struct clocksource *cs) in tpu_clocksource_disable()
131 pr_err("failed to get clock for clocksource\n"); in h8300_tpu_init()
137 pr_err("failed to map registers for clocksource\n"); in h8300_tpu_init()
142 pr_err("failed to map registers for clocksource\n"); in h8300_tpu_init()
Dtimer-pistachio.c2 * Pistachio clocksource based on general-purpose timers
14 #include <linux/clocksource.h>
51 struct clocksource cs;
71 pistachio_clocksource_read_cycles(struct clocksource *cs) in pistachio_clocksource_read_cycles()
95 static void pistachio_clksrc_set_mode(struct clocksource *cs, int timeridx, in pistachio_clksrc_set_mode()
110 static void pistachio_clksrc_enable(struct clocksource *cs, int timeridx) in pistachio_clksrc_enable()
120 static void pistachio_clksrc_disable(struct clocksource *cs, int timeridx) in pistachio_clksrc_disable()
126 static int pistachio_clocksource_enable(struct clocksource *cs) in pistachio_clocksource_enable()
132 static void pistachio_clocksource_disable(struct clocksource *cs) in pistachio_clocksource_disable()
204 /* Disable irq's for clocksource usage */ in pistachio_clksrc_of_init()
Ddw_apb_timer.c44 clocksource_to_dw_apb_clocksource(struct clocksource *cs) in clocksource_to_dw_apb_clocksource()
320 * dw_apb_clocksource_start() - start the clocksource counting.
322 * @dw_cs: The clocksource to start.
324 * This is used to start the clocksource before registration and can be used
346 static u64 __apbt_read_clocksource(struct clocksource *cs) in __apbt_read_clocksource()
358 static void apbt_restart_clocksource(struct clocksource *cs) in apbt_restart_clocksource()
367 * dw_apb_clocksource_init() - use an APB timer as a clocksource.
369 * @rating: The rating to give the clocksource.
370 * @name: The name for the clocksource.
374 * This creates a clocksource using an APB timer but does not yet register it
[all …]
Dtimer-ti-32k.c7 * Update to use new clocksource/clockevent layers
31 #include <linux/clocksource.h>
36 * 32KHz clocksource ... always available, on pretty most chips except
50 struct clocksource cs;
53 static inline struct ti_32k *to_ti_32k(struct clocksource *cs) in to_ti_32k()
58 static u64 notrace ti_32k_read_cycles(struct clocksource *cs) in ti_32k_read_cycles()
152 pr_info("OMAP clocksource: 32k_counter at 32768 Hz\n"); in ti_32k_timer_init()
156 pr_err("32k_counter: can't register clocksource\n"); in ti_32k_timer_init()
Dtimer-atmel-pit.c7 * Converted to ClockSource/ClockEvents by David Brownell.
40 struct clocksource clksrc;
49 static inline struct pit_data *clksrc_to_pit_data(struct clocksource *clksrc) in clksrc_to_pit_data()
70 * Clocksource: just a monotonic counter of MCK/16 cycles.
73 static u64 read_pit_clk(struct clocksource *cs) in read_pit_clk()
94 /* disable irq, leaving the clocksource active */ in pit_clkevt_shutdown()
106 /* update clocksource counter */ in pit_clkevt_set_periodic()
164 * Set up both clocksource and clockevent support.
217 * Register clocksource. The high order bits of PIV are unused, in at91sam926x_pit_dt_init()
229 pr_err("Failed to register clocksource\n"); in at91sam926x_pit_dt_init()
Darc_timer.c9 * We've designated TIMER0 for clockevents and TIMER1 for clocksource
19 #include <linux/clocksource.h>
58 static u64 arc_read_gfrc(struct clocksource *cs) in arc_read_gfrc()
95 static struct clocksource arc_counter_gfrc = {
110 pr_warn("Global-64-bit-Ctr clocksource not detected\n"); in arc_cs_setup_gfrc()
128 static u64 arc_read_rtc(struct clocksource *cs) in arc_read_rtc()
153 static struct clocksource arc_counter_rtc = {
168 pr_warn("Local-64-bit-Ctr clocksource not detected\n"); in arc_cs_setup_rtc()
196 static u64 arc_read_timer1(struct clocksource *cs) in arc_read_timer1()
206 static struct clocksource arc_counter_timer1 = {
Dscx200_hrt.c5 * This is a clocksource driver for the Geode SCx200's 1 or 27 MHz
15 #include <linux/clocksource.h>
42 static u64 read_hrt(struct clocksource *cs) in read_hrt()
48 static struct clocksource cs_hrt = {
88 MODULE_DESCRIPTION("clocksource on SCx200 HiRes Timer");
Dsh_tmu.c10 #include <linux/clocksource.h>
47 struct clocksource cs;
248 static struct sh_tmu_channel *cs_to_sh_tmu(struct clocksource *cs) in cs_to_sh_tmu()
253 static u64 sh_tmu_clocksource_read(struct clocksource *cs) in sh_tmu_clocksource_read()
260 static int sh_tmu_clocksource_enable(struct clocksource *cs) in sh_tmu_clocksource_enable()
275 static void sh_tmu_clocksource_disable(struct clocksource *cs) in sh_tmu_clocksource_disable()
286 static void sh_tmu_clocksource_suspend(struct clocksource *cs) in sh_tmu_clocksource_suspend()
299 static void sh_tmu_clocksource_resume(struct clocksource *cs) in sh_tmu_clocksource_resume()
315 struct clocksource *cs = &ch->cs; in sh_tmu_register_clocksource()
439 bool clockevent, bool clocksource) in sh_tmu_register() argument
[all …]
/Linux-v5.10/tools/testing/selftests/timers/
Dclocksource-switch.c1 /* Clocksource change test
12 * $ gcc clocksource-switch.c -o clocksource-switch -lrt
47 fd = open("/sys/devices/system/clocksource/clocksource0/available_clocksource", O_RDONLY); in get_clocksources()
79 fd = open("/sys/devices/system/clocksource/clocksource0/current_clocksource", O_RDONLY); in get_cur_clocksource()
86 int change_clocksource(char *clocksource) in change_clocksource() argument
91 fd = open("/sys/devices/system/clocksource/clocksource0/current_clocksource", O_WRONLY); in change_clocksource()
96 size = write(fd, clocksource, strlen(clocksource)); in change_clocksource()
139 printf("Validating clocksource %s\n", clocksource_list[i]); in main()
/Linux-v5.10/arch/arm/mach-iop32x/
Dtime.c18 #include <linux/clocksource.h>
31 * Minimum clocksource/clockevent timer range in seconds
36 * IOP clocksource (free-running timer 1).
38 static u64 notrace iop_clocksource_read(struct clocksource *unused) in iop_clocksource_read()
43 static struct clocksource iop_clocksource = {
52 * IOP sched_clock() implementation via its clocksource.
173 * Set up free-running clocksource timer 1. in iop_init_time()
/Linux-v5.10/arch/mips/alchemy/common/
Dtime.c16 * Clocksource/event using the 32.768kHz-clocked Counter1 ('RTC' in the
18 * counter control register, otherwise the CP0 counter clocksource/event
23 #include <linux/clocksource.h>
35 static u64 au1x_counter1_read(struct clocksource *cs) in au1x_counter1_read()
40 static struct clocksource au1x_counter1_clocksource = {
83 * has been detected. If so install the rtcmatch2 clocksource, in alchemy_time_init()
116 /* register counter1 clocksource and event device */ in alchemy_time_init()
130 printk(KERN_INFO "Alchemy clocksource installed\n"); in alchemy_time_init()
/Linux-v5.10/arch/mips/sgi-ip30/
Dip30-timer.c3 * ip30-timer.c: Clocksource/clockevent support for the
11 #include <linux/clocksource.h>
22 static u64 ip30_heart_counter_read(struct clocksource *cs) in ip30_heart_counter_read()
27 struct clocksource ip30_heart_clocksource = {
42 struct clocksource *cs = &ip30_heart_clocksource; in ip30_heart_clocksource_init()
/Linux-v5.10/include/clocksource/
Dtimer-davinci.h3 * TI DaVinci clocksource driver
22 * struct davinci_timer_cfg - davinci clocksource driver configuration struct
24 * @irq: clockevent and clocksource interrupt resources
28 * clock half for both clocksource and clockevent and the compare register
/Linux-v5.10/arch/mips/kernel/
Dcsrc-bcm1480.c5 #include <linux/clocksource.h>
19 static u64 bcm1480_hpt_read(struct clocksource *cs) in bcm1480_hpt_read()
24 struct clocksource bcm1480_clocksource = {
39 struct clocksource *cs = &bcm1480_clocksource; in sb1480_clocksource_init()
Dcsrc-ioasic.c3 * DEC I/O ASIC's counter clocksource
7 #include <linux/clocksource.h>
16 static u64 dec_ioasic_hpt_read(struct clocksource *cs) in dec_ioasic_hpt_read()
21 static struct clocksource clocksource_dec = {
/Linux-v5.10/arch/arm/mach-footbridge/
Ddc21285-timer.c9 #include <linux/clocksource.h>
23 static u64 cksrc_dc21285_read(struct clocksource *cs) in cksrc_dc21285_read()
28 static int cksrc_dc21285_enable(struct clocksource *cs) in cksrc_dc21285_enable()
36 static void cksrc_dc21285_disable(struct clocksource *cs) in cksrc_dc21285_disable()
41 static struct clocksource cksrc_dc21285 = {

12345678910>>...16