/linux/include/linux/ |
H A D | clocksource.h | 2 /* linux/include/linux/clocksource.h 6 * If you are not a clocksource, or timekeeping code, you should 25 struct clocksource; 30 #include <asm/clocksource.h> 33 #include <vdso/clocksource.h> 36 * struct clocksource - hardware abstraction for a free running counter 40 * @read: Returns a cycle value, passes clocksource as argument 45 * @max_idle_ns: Maximum idle time permitted by the clocksource (nsecs) 53 * @name: Pointer to clocksource name 55 * @freq_khz: Clocksource frequency in khz. [all …]
|
/linux/kernel/time/ |
H A D | clocksource.c | 3 * This file contains the functions which manage clocksource drivers. 11 #include <linux/clocksource.h> 23 static void clocksource_enqueue(struct clocksource *cs); 25 static noinline u64 cycles_to_nsec_safe(struct clocksource *cs, u64 start, u64 end) in cycles_to_nsec_safe() 90 /*[Clocksource internal variables]--------- 92 * currently selected clocksource. 100 * Name of the user-specified clocksource. 102 static struct clocksource *curr_clocksource; 103 static struct clocksource *suspend_clocksource; 123 * clocksource surrounding a read of the clocksource being validated. [all …]
|
H A D | clocksource-wdtest.c | 3 * Unit test for the clocksource watchdog. 12 #include <linux/clocksource.h> 25 MODULE_DESCRIPTION("Clocksource watchdog unit test"); 35 static u64 wdtest_jiffies_read(struct clocksource *cs) in wdtest_jiffies_read() 40 static struct clocksource clocksource_wdtest_jiffies = { 55 static u64 wdtest_ktime_read(struct clocksource *cs) in wdtest_ktime_read() 73 static void wdtest_ktime_cs_mark_unstable(struct clocksource *cs) in wdtest_ktime_cs_mark_unstable() 75 pr_info("--- Marking %s unstable due to clocksource watchdog.\n", cs->name); in wdtest_ktime_cs_mark_unstable() 83 static struct clocksource clocksource_wdtest_ktime = { 93 /* Reset the clocksource i [all...] |
H A D | jiffies.c | 3 * This file contains the jiffies based clocksource. 7 #include <linux/clocksource.h> 16 static u64 jiffies_read(struct clocksource *cs) in jiffies_read() 22 * The Jiffies based clocksource is the lowest common 32 static struct clocksource clocksource_jiffies = { 71 struct clocksource * __init __weak clocksource_default_clock(void) in clocksource_default_clock() 76 static struct clocksource refined_jiffies;
|
H A D | timekeeping.c | 17 #include <linux/clocksource.h> 78 static u64 dummy_clock_read(struct clocksource *cs) in dummy_clock_read() 85 static struct clocksource dummy_clock = { 93 * and shift=0. When the first proper clocksource is installed then 210 * tk_clock_read - atomic clocksource read() helper 215 * the tkr's clocksource may change between the read reference, and the 217 * the wrong clocksource is passed to the wrong read function. 224 struct clocksource *clock = READ_ONCE(tkr->clock); in tk_clock_read() 230 * tk_setup_internals - Set up internals to use clocksource clock. 233 * @clock: Pointer to clocksource. [all …]
|
/linux/drivers/clocksource/ |
H A D | mmio.c | 3 * 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 …]
|
H A D | timer-vt8500.c | 17 #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()
|
H A D | hyperv_timer.c | 4 * Clocksource driver for the synthetic counter and timers 17 #include <linux/clocksource.h> 25 #include <clocksource/hyperv_timer.h> 43 * interrupts are enabled for other clocksource drivers. 148 * as a better clocksource and it's challenging to mark the Hyper-V in hv_stimer_init() 332 * clocksource driver just to set the sint in the legacy case. in hv_stimer_legacy_init() 441 static u64 notrace read_hv_clock_tsc_cs(struct clocksource *arg) in read_hv_clock_tsc_cs() 452 static void suspend_hv_clock_tsc(struct clocksource *arg) in suspend_hv_clock_tsc() 463 static void resume_hv_clock_tsc(struct clocksource *arg) in resume_hv_clock_tsc() 486 static int hv_cs_enable(struct clocksource *cs) in hv_cs_enable() [all …]
|
H A D | timer-pistachio.c | 3 * Pistachio clocksource based on general-purpose timers 11 #include <linux/clocksource.h> 48 struct clocksource cs; 68 pistachio_clocksource_read_cycles(struct clocksource *cs) in pistachio_clocksource_read_cycles() 93 static void pistachio_clksrc_set_mode(struct clocksource *cs, int timeridx, in pistachio_clksrc_set_mode() 108 static void pistachio_clksrc_enable(struct clocksource *cs, int timeridx) in pistachio_clksrc_enable() 118 static void pistachio_clksrc_disable(struct clocksource *cs, int timeridx) in pistachio_clksrc_disable() 124 static int pistachio_clocksource_enable(struct clocksource *cs) in pistachio_clocksource_enable() 130 static void pistachio_clocksource_disable(struct clocksource *cs) in pistachio_clocksource_disable() 202 /* Disable irq's for clocksource usage */ in pistachio_clksrc_of_init()
|
H A D | timer-ti-32k.c | 7 * 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()
|
H A D | timer-atmel-pit.c | 7 * 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()
|
H A D | timer-goldfish.c | 5 #include <linux/clocksource.h> 10 #include <clocksource/timer-goldfish.h> 13 struct clocksource cs; 24 static struct goldfish_timer *cs_to_gf(struct clocksource *cs) in cs_to_gf() 29 static u64 goldfish_timer_read(struct clocksource *cs) in goldfish_timer_read() 131 timerdrv->cs = (struct clocksource){ in goldfish_timer_init()
|
H A D | arc_timer.c | 9 * 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 = {
|
H A D | acpi_pm.c | 3 * linux/drivers/clocksource/acpi_pm.c 5 * This file contains the ACPI PM based clocksource. 19 #include <linux/clocksource.h> 79 static void acpi_pm_suspend(struct clocksource *cs) in acpi_pm_suspend() 85 static void acpi_pm_resume(struct clocksource *cs) in acpi_pm_resume() 91 static u64 acpi_pm_read(struct clocksource *cs) in acpi_pm_read() 96 static struct clocksource clocksource_acpi_pm = { 116 static u64 acpi_pm_read_slow(struct clocksource *cs) in acpi_pm_read_slow()
|
H A D | ingenic-ost.c | 10 #include <linux/clocksource.h> 39 struct clocksource cs; 56 static u64 notrace ingenic_ost_clocksource_readl(struct clocksource *cs) in ingenic_ost_clocksource_readl() 61 static u64 notrace ingenic_ost_clocksource_readh(struct clocksource *cs) in ingenic_ost_clocksource_readh() 71 struct clocksource *cs; in ingenic_ost_probe() 127 dev_err(dev, "clocksource registration failed"); in ingenic_ost_probe()
|
H A D | scx200_hrt.c | 5 * 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");
|
H A D | sh_tmu.c | 10 #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 …]
|
H A D | clksrc_st_lpc.c | 3 * Clocksource using the Low Power Timer found in the Low Power Controller (LPC) 12 #include <linux/clocksource.h> 58 pr_err("clksrc-st-lpc: Failed to register clocksource\n"); in st_clksrc_init() 102 /* LPC can either run as a Clocksource or in RTC or WDT mode */ in st_clksrc_of_register() 126 pr_info("clksrc-st-lpc: clocksource initialised - running @ %luHz\n", in st_clksrc_of_register()
|
/linux/arch/mips/alchemy/common/ |
H A D | time.c | 16 * 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/arch/mips/sgi-ip30/ |
H A D | ip30-timer.c | 3 * 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/include/clocksource/ |
H A D | timer-davinci.h | 3 * 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/arch/arm/mach-footbridge/ |
H A D | dc21285-timer.c | 9 #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 = {
|
/linux/arch/mips/kernel/ |
H A D | csrc-bcm1480.c | 5 #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()
|
H A D | csrc-ioasic.c | 3 * 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 = {
|
H A D | csrc-sb1250.c | 5 #include <linux/clocksource.h> 35 static u64 sb1250_hpt_read(struct clocksource *cs) in sb1250_hpt_read() 40 struct clocksource bcm1250_clocksource = { 55 struct clocksource *cs = &bcm1250_clocksource; in sb1250_clocksource_init()
|