Home
last modified time | relevance | path

Searched full:timer (Results 1 – 25 of 3452) sorted by relevance

12345678910>>...139

/linux/drivers/clocksource/
H A Dtimer-ti-dm.c33 #include <clocksource/timer-ti-dm.h>
36 * timer errata flags
40 * timer counter register is never read. For more details please refer to
158 * dmtimer_read - read timer registers in posted and non-posted mode
159 * @timer: timer pointer over which read operation to perform
166 static inline u32 dmtimer_read(struct dmtimer *timer, u32 reg) in dmtimer_read() argument
174 if (wp && timer->posted) in dmtimer_read()
175 while (readl_relaxed(timer->pend) & wp) in dmtimer_read()
178 return readl_relaxed(timer->func_base + offset); in dmtimer_read()
182 * dmtimer_write - write timer registers in posted and non-posted mode
[all …]
H A Dtimer-zevio.c3 * linux/drivers/clocksource/zevio-timer.c
64 struct zevio_timer *timer = container_of(dev, struct zevio_timer, in zevio_timer_set_event() local
67 writel(delta, timer->timer1 + IO_CURRENT_VAL); in zevio_timer_set_event()
69 timer->timer1 + IO_CONTROL); in zevio_timer_set_event()
76 struct zevio_timer *timer = container_of(dev, struct zevio_timer, in zevio_timer_shutdown() local
79 /* Disable timer interrupts */ in zevio_timer_shutdown()
80 writel(0, timer->interrupt_regs + IO_INTR_MSK); in zevio_timer_shutdown()
81 writel(TIMER_INTR_ALL, timer->interrupt_regs + IO_INTR_ACK); in zevio_timer_shutdown()
82 /* Stop timer */ in zevio_timer_shutdown()
83 writel(CNTL_STOP_TIMER, timer->timer1 + IO_CONTROL); in zevio_timer_shutdown()
[all …]
H A Dtimer-microchip-pit64b.c3 * 64-bit Periodic Interval Timer driver
38 #define MCHP_PIT64B_TLSBR 0x20 /* Timer LSB Register */
40 #define MCHP_PIT64B_TMSBR 0x24 /* Timer MSB Register */
51 * struct mchp_pit64b_timer - PIT64B timer data structure
66 * @timer: PIT64B timer
70 struct mchp_pit64b_timer timer; member
80 * @timer: PIT64B timer
84 struct mchp_pit64b_timer timer; member
92 /* Base address for clocksource timer. */
94 /* Default cycles for clockevent timer. */
[all …]
H A Dtimer-rockchip.c3 * Rockchip timer support
44 struct rk_timer timer; member
52 return &container_of(ce, struct rk_clkevt, ce)->timer; in rk_timer()
55 static inline void rk_timer_disable(struct rk_timer *timer) in rk_timer_disable() argument
57 writel_relaxed(TIMER_DISABLE, timer->ctrl); in rk_timer_disable()
60 static inline void rk_timer_enable(struct rk_timer *timer, u32 flags) in rk_timer_enable() argument
62 writel_relaxed(TIMER_ENABLE | flags, timer->ctrl); in rk_timer_enable()
66 struct rk_timer *timer) in rk_timer_update_counter() argument
68 writel_relaxed(cycles, timer->base + TIMER_LOAD_COUNT0); in rk_timer_update_counter()
69 writel_relaxed(0, timer->base + TIMER_LOAD_COUNT1); in rk_timer_update_counter()
[all …]
H A Dbcm2835_timer.c46 struct bcm2835_timer *timer = container_of(evt_dev, in bcm2835_time_set_next_event() local
49 timer->compare); in bcm2835_time_set_next_event()
55 struct bcm2835_timer *timer = dev_id; in bcm2835_time_interrupt() local
57 if (readl_relaxed(timer->control) & timer->match_mask) { in bcm2835_time_interrupt()
58 writel_relaxed(timer->match_mask, timer->control); in bcm2835_time_interrupt()
60 event_handler = READ_ONCE(timer->evt.event_handler); in bcm2835_time_interrupt()
62 event_handler(&timer->evt); in bcm2835_time_interrupt()
74 struct bcm2835_timer *timer; in bcm2835_timer_init() local
101 timer = kzalloc(sizeof(*timer), GFP_KERNEL); in bcm2835_timer_init()
102 if (!timer) { in bcm2835_timer_init()
[all …]
/linux/drivers/rtc/
H A Drtc-brcmstb-waketimer.c48 static inline bool brcmstb_waketmr_is_pending(struct brcmstb_waketmr *timer) in brcmstb_waketmr_is_pending() argument
52 reg = readl_relaxed(timer->base + BRCMSTB_WKTMR_EVENT); in brcmstb_waketmr_is_pending()
56 static inline void brcmstb_waketmr_clear_alarm(struct brcmstb_waketmr *timer) in brcmstb_waketmr_clear_alarm() argument
60 if (timer->alarm_en && timer->alarm_irq) in brcmstb_waketmr_clear_alarm()
61 disable_irq(timer->alarm_irq); in brcmstb_waketmr_clear_alarm()
62 timer->alarm_en = false; in brcmstb_waketmr_clear_alarm()
63 reg = readl_relaxed(timer->base + BRCMSTB_WKTMR_COUNTER); in brcmstb_waketmr_clear_alarm()
64 writel_relaxed(reg - 1, timer->base + BRCMSTB_WKTMR_ALARM); in brcmstb_waketmr_clear_alarm()
65 writel_relaxed(WKTMR_ALARM_EVENT, timer->base + BRCMSTB_WKTMR_EVENT); in brcmstb_waketmr_clear_alarm()
66 (void)readl_relaxed(timer->base + BRCMSTB_WKTMR_EVENT); in brcmstb_waketmr_clear_alarm()
[all …]
/linux/include/linux/
H A Dhrtimer.h21 #include <linux/timer.h>
28 * HRTIMER_MODE_PINNED - Timer is bound to CPU (is only considered
29 * when starting the timer)
30 * HRTIMER_MODE_SOFT - Timer callback function will be executed in
32 * HRTIMER_MODE_HARD - Timer callback function will be executed in
59 * Values to track state of the timer
66 * The callback state is not part of the timer->state because clearing it would
67 * mean touching the timer after the callback, this makes it impossible to free
68 * the timer from the callback function.
72 * timer->base->cpu_base->running == timer
[all …]
H A Dtimer.h26 * @TIMER_DEFERRABLE: A deferrable timer will work normally when the
28 * to service it; instead, the timer will be serviced when the CPU
29 * eventually wakes up with a subsequent non-deferrable timer.
31 * @TIMER_IRQSAFE: An irqsafe timer is executed with IRQ disabled and
39 * @TIMER_PINNED: A pinned timer will always expire on the CPU on which the
40 * timer was enqueued. When a particular CPU is required, add_timer_on()
68 * LOCKDEP and DEBUG timer interfaces.
70 void init_timer_key(struct timer_list *timer,
75 extern void init_timer_on_stack_key(struct timer_list *timer,
80 static inline void init_timer_on_stack_key(struct timer_list *timer, in init_timer_on_stack_key() argument
[all …]
/linux/net/netfilter/
H A Dxt_IDLETIMER.c5 * Netfilter module to trigger a timer when packet matches.
6 * After timer expires a kevent will be sent.
20 #include <linux/timer.h>
35 struct timer_list timer; member
66 struct idletimer_tg *timer; in idletimer_tg_show() local
73 timer = __idletimer_tg_find_by_label(attr->attr.name); in idletimer_tg_show()
74 if (timer) { in idletimer_tg_show()
75 if (timer->timer_type & XT_IDLETIMER_ALARM) { in idletimer_tg_show()
76 ktime_t expires_alarm = alarm_expires_remaining(&timer->alarm); in idletimer_tg_show()
80 expires = timer->timer.expires; in idletimer_tg_show()
[all …]
/linux/kernel/time/
H A Dtimer.c16 * 2000-10-05 Implemented scalable SMP per-CPU timer handling.
58 #include <trace/events/timer.h>
65 * The timer wheel has LVL_DEPTH array levels. Each level provides an array of
72 * The array level of a newly armed timer depends on the relative expiry
76 * Contrary to the original timer wheel implementation, which aims for 'exact'
78 * the timers into the lower array levels. The previous 'classic' timer wheel
83 * This is an optimization of the original timer wheel implementation for the
84 * majority of the timer wheel use cases: timeouts. The vast majority of
206 * struct timer_base - Per CPU timer base (number of base depends on config)
210 * currently running timer, the pointer is set to the
[all …]
H A Dhrtimer.c9 * In contrast to the low-resolution timeout API, aka timer wheel,
16 * Based on the original timer wheel code
42 #include <linux/timer.h>
48 #include <trace/events/timer.h>
64 * The timer bases:
67 * into the timer bases by the hrtimer_base_type enum. When trying
137 * timer->base->cpu_base
151 * means that all timers which are tied to this base via timer->base are
157 * When the timer's base is locked, and the timer removed from list, it is
158 * possible to set timer->base = &migration_base and drop the lock: the timer
[all …]
H A Dposix-cpu-timers.c13 #include <trace/events/timer.h>
22 static void posix_cpu_timer_rearm(struct k_itimer *timer);
34 * Called after updating RLIMIT_CPU to run cpu timer and update
67 * If the encoded PID is 0, then the timer is targeted at current in pid_for_clock()
113 static inline struct task_struct *cpu_timer_task_rcu(struct k_itimer *timer) in cpu_timer_task_rcu() argument
115 return pid_task(timer->it.cpu.pid, clock_pid_type(timer->it_clock)); in cpu_timer_task_rcu()
122 static u64 bump_cpu_timer(struct k_itimer *timer, u64 now) in bump_cpu_timer() argument
124 u64 delta, incr, expires = timer->it.cpu.node.expires; in bump_cpu_timer()
127 if (!timer->it_interval) in bump_cpu_timer()
133 incr = timer->it_interval; in bump_cpu_timer()
[all …]
/linux/sound/core/
H A Dtimer.c19 #include <sound/timer.h>
39 MODULE_DESCRIPTION("ALSA timer interface");
47 MODULE_ALIAS("devname:snd/timer");
116 /* Internal data structure for keeping the state of the userspace-driven timer */
119 struct snd_timer *timer; member
140 static int snd_timer_free(struct snd_timer *timer);
145 static void snd_timer_reschedule(struct snd_timer * timer, unsigned long ticks_left);
148 * create a timer instance with the given owner string.
184 * find a timer instance from the given timer id
188 struct snd_timer *timer; in snd_timer_find() local
[all …]
/linux/arch/s390/kernel/
H A Dvtime.c3 * Virtual cpu timer based timer functions.
39 u64 timer; in set_vtimer() local
42 " stpt %0\n" /* Store current cpu timer value */ in set_vtimer()
44 : "=Q" (timer) : "Q" (expires)); in set_vtimer()
45 lc->system_timer += lc->last_update_timer - timer; in set_vtimer()
120 u64 timer, clock, user, guest, system, hardirq, softirq; in do_account_vtime() local
123 timer = lc->last_update_timer; in do_account_vtime()
126 " stpt %0\n" /* Store current cpu timer value */ in do_account_vtime()
132 timer -= lc->last_update_timer; in do_account_vtime()
135 lc->hardirq_timer += timer; in do_account_vtime()
[all …]
/linux/Documentation/devicetree/bindings/timer/
H A Dti,timer-dm.yaml4 $id: http://devicetree.org/schemas/timer/ti,timer-dm.yaml#
7 title: TI dual-mode timer
13 The TI dual-mode timer is a general purpose timer with PWM capabilities.
20 - ti,am335x-timer
21 - ti,am335x-timer-1ms
22 - ti,am654-timer
23 - ti,dm814-timer
24 - ti,dm816-timer
25 - ti,omap2420-timer
26 - ti,omap3430-timer
[all …]
H A Dmediatek,timer.yaml4 $id: http://devicetree.org/schemas/timer/mediatek,timer.yaml#
14 CPUX (ARM/ARM64 System Timer), GPT (General Purpose Timer)
15 and SYST (System Timer).
22 - mediatek,mt6577-timer
23 - mediatek,mt6765-timer
28 - mediatek,mt2701-timer
29 - mediatek,mt6580-timer
30 - mediatek,mt6582-timer
31 - mediatek,mt6589-timer
32 - mediatek,mt7623-timer
[all …]
H A Dnvidia,tegra-timer.yaml4 $id: http://devicetree.org/schemas/timer/nvidia,tegra-timer.yaml#
7 title: NVIDIA Tegra timer
17 const: nvidia,tegra210-timer
25 A list of 14 interrupts; one per each timer channels 0 through 13
33 - nvidia,tegra114-timer
34 - nvidia,tegra124-timer
35 - nvidia,tegra132-timer
36 - const: nvidia,tegra30-timer
38 - const: nvidia,tegra30-timer
39 - const: nvidia,tegra20-timer
[all …]
H A Drockchip,rk-timer.yaml4 $id: http://devicetree.org/schemas/timer/rockchip,rk-timer.yaml#
7 title: Rockchip Timer
15 - const: rockchip,rk3288-timer
16 - const: rockchip,rk3399-timer
19 - rockchip,rv1108-timer
20 - rockchip,rv1126-timer
21 - rockchip,rk3036-timer
22 - rockchip,rk3128-timer
23 - rockchip,rk3188-timer
24 - rockchip,rk3228-timer
[all …]
/linux/sound/isa/gus/
H A Dgus_timer.c14 * Timer 1 - 80us
17 static int snd_gf1_timer1_start(struct snd_timer * timer) in snd_gf1_timer1_start() argument
24 gus = snd_timer_chip(timer); in snd_gf1_timer1_start()
26 ticks = timer->sticks; in snd_gf1_timer1_start()
28 snd_gf1_write8(gus, SNDRV_GF1_GB_ADLIB_TIMER_1, 256 - ticks); /* timer 1 count */ in snd_gf1_timer1_start()
29 snd_gf1_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, tmp); /* enable timer 1 IRQ */ in snd_gf1_timer1_start()
30 snd_gf1_adlib_write(gus, 0x04, tmp >> 2); /* timer 2 start */ in snd_gf1_timer1_start()
35 static int snd_gf1_timer1_stop(struct snd_timer * timer) in snd_gf1_timer1_stop() argument
41 gus = snd_timer_chip(timer); in snd_gf1_timer1_stop()
44 snd_gf1_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, tmp); /* disable timer #1 */ in snd_gf1_timer1_stop()
[all …]
/linux/arch/nios2/kernel/
H A Dtime.c22 #define ALTR_TIMER_COMPATIBLE "altr,timer-1.0"
42 struct nios2_timer timer; member
47 struct nios2_timer timer; member
63 static u16 timer_readw(struct nios2_timer *timer, u32 offs) in timer_readw() argument
65 return readw(timer->base + offs); in timer_readw()
68 static void timer_writew(struct nios2_timer *timer, u16 val, u32 offs) in timer_writew() argument
70 writew(val, timer->base + offs); in timer_writew()
73 static inline unsigned long read_timersnapshot(struct nios2_timer *timer) in read_timersnapshot() argument
77 timer_writew(timer, 0, ALTERA_TIMER_SNAPL_REG); in read_timersnapshot()
78 count = timer_readw(timer, ALTERA_TIMER_SNAPH_REG) << 16 | in read_timersnapshot()
[all …]
/linux/include/linux/mfd/
H A Drz-mtu3.h13 #define RZ_MTU3_TSTRA 0x080 /* Timer start register A */
14 #define RZ_MTU3_TSTRB 0x880 /* Timer start register B */
17 #define RZ_MTU3_TDDRA 0x016 /* Timer dead time data register A */
18 #define RZ_MTU3_TDDRB 0x816 /* Timer dead time data register B */
19 #define RZ_MTU3_TCDRA 0x014 /* Timer cycle data register A */
20 #define RZ_MTU3_TCDRB 0x814 /* Timer cycle data register B */
21 #define RZ_MTU3_TCBRA 0x022 /* Timer cycle buffer register A */
22 #define RZ_MTU3_TCBRB 0x822 /* Timer cycle buffer register B */
23 #define RZ_MTU3_TCNTSA 0x020 /* Timer subcounter A */
24 #define RZ_MTU3_TCNTSB 0x820 /* Timer subcounter B */
[all …]
/linux/sound/core/seq/oss/
H A Dseq_oss_timer.c5 * Timer control routines
24 static void calc_alsa_tempo(struct seq_oss_timer *timer);
29 * create and register a new timer.
54 * delete timer.
55 * if no more timer exists, stop the queue.
70 * 0 : not a timer event -- enqueue this event
116 calc_alsa_tempo(struct seq_oss_timer *timer) in calc_alsa_tempo() argument
118 timer->tempo = (60 * 1000000) / timer->oss_tempo; in calc_alsa_tempo()
119 timer->ppq = timer->oss_timebase; in calc_alsa_tempo()
124 * dispatch a timer event
[all …]
/linux/tools/testing/selftests/bpf/progs/
H A Dtimer.c13 struct bpf_timer timer; member
73 static int timer_cb1(void *map, int *key, struct bpf_timer *timer) in timer_cb1() argument
76 * Once via array timer callback and once via lru timer callback in timer_cb1()
80 /* *key == 0 - the callback was called for array timer. in timer_cb1()
81 * *key == 4 - the callback was called from lru timer. in timer_cb1()
87 /* rearm array timer to be called again in ~35 seconds */ in timer_cb1()
88 if (bpf_timer_start(timer, 1ull << 35, 0) != 0) in timer_cb1()
113 * element and force deletion of this timer in timer_cb1()
120 * which means that key/timer memory was reused in timer_cb1()
126 /* check that the timer was removed */ in timer_cb1()
[all …]
/linux/arch/loongarch/kvm/
H A Dtimer.c11 * ktime_to_tick() - Scale ktime_t to timer tick value.
27 enum hrtimer_restart kvm_swtimer_wakeup(struct hrtimer *timer) in kvm_swtimer_wakeup() argument
31 vcpu = container_of(timer, struct kvm_vcpu, arch.swtimer); in kvm_swtimer_wakeup()
39 * Initialise the timer to the specified frequency, zero it
50 * Restore soft timer state from saved context.
60 * Set guest stable timer cfg csr in kvm_restore_timer()
61 * Disable timer before restore estat CSR register, avoid to in kvm_restore_timer()
62 * get invalid timer interrupt for old timer cfg in kvm_restore_timer()
70 /* Guest timer is disabled, just restore timer registers */ in kvm_restore_timer()
76 * Freeze the soft-timer and sync the guest stable timer with it. in kvm_restore_timer()
[all …]
/linux/arch/powerpc/sysdev/
H A Dfsl_gtm.c38 u8 gtcfr1; /* Timer 1, Timer 2 global config register */
40 u8 gtcfr2; /* Timer 3, timer 4 global config register */
42 __be16 gtmdr1; /* Timer 1 mode register */
43 __be16 gtmdr2; /* Timer 2 mode register */
44 __be16 gtrfr1; /* Timer 1 reference register */
45 __be16 gtrfr2; /* Timer 2 reference register */
46 __be16 gtcpr1; /* Timer 1 capture register */
47 __be16 gtcpr2; /* Timer 2 capture register */
48 __be16 gtcnr1; /* Timer 1 counter */
49 __be16 gtcnr2; /* Timer 2 counter */
[all …]

12345678910>>...139