Home
last modified time | relevance | path

Searched refs:timer (Results 1 – 25 of 1789) sorted by relevance

12345678910>>...72

/linux/drivers/clocksource/
H A Dtimer-ti-dm.c166 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()
191 static inline void dmtimer_write(struct dmtimer *timer, u32 reg, u32 val) in dmtimer_write() argument
199 if (wp && timer->posted) in dmtimer_write()
200 while (readl_relaxed(timer->pend) & wp) in dmtimer_write()
203 writel_relaxed(val, timer->func_base + offset); in dmtimer_write()
206 static inline void __omap_dm_timer_init_regs(struct dmtimer *timer) in __omap_dm_timer_init_regs() argument
211 tidr = readl_relaxed(timer->io_base); in __omap_dm_timer_init_regs()
[all …]
H A Dtimer-zevio.c64 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
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()
83 writel(CNTL_STOP_TIMER, timer->timer1 + IO_CONTROL); in zevio_timer_shutdown()
89 struct zevio_timer *timer = container_of(dev, struct zevio_timer, in zevio_timer_set_oneshot() local
93 writel(TIMER_INTR_MSK, timer->interrupt_regs + IO_INTR_MSK); in zevio_timer_set_oneshot()
94 writel(TIMER_INTR_ALL, timer->interrupt_regs + IO_INTR_ACK); in zevio_timer_set_oneshot()
[all …]
H A DMakefile2 obj-$(CONFIG_TIMER_OF) += timer-of.o
3 obj-$(CONFIG_TIMER_PROBE) += timer-probe.o
4 obj-$(CONFIG_ATMEL_PIT) += timer-atmel-pit.o
5 obj-$(CONFIG_ATMEL_ST) += timer-atmel-st.o
6 obj-$(CONFIG_ATMEL_TCB_CLKSRC) += timer-atmel-tcb.o
9 obj-$(CONFIG_CS5535_CLOCK_EVENT_SRC) += timer-cs5535.o
18 obj-$(CONFIG_DAVINCI_TIMER) += timer-davinci.o
19 obj-$(CONFIG_DIGICOLOR_TIMER) += timer-digicolor.o
20 obj-$(CONFIG_ECONET_EN751221_TIMER) += timer-econet-en751221.o
21 obj-$(CONFIG_OMAP_DM_TIMER) += timer-ti-dm.o
[all …]
H A Dtimer-microchip-pit64b.c70 struct mchp_pit64b_timer timer; member
84 struct mchp_pit64b_timer timer; member
119 static inline void mchp_pit64b_reset(struct mchp_pit64b_timer *timer, in mchp_pit64b_reset() argument
127 writel_relaxed(MCHP_PIT64B_CR_SWRST, timer->base + MCHP_PIT64B_CR); in mchp_pit64b_reset()
128 writel_relaxed(mode | timer->mode, timer->base + MCHP_PIT64B_MR); in mchp_pit64b_reset()
129 writel_relaxed(high, timer->base + MCHP_PIT64B_MSB_PR); in mchp_pit64b_reset()
130 writel_relaxed(low, timer->base + MCHP_PIT64B_LSB_PR); in mchp_pit64b_reset()
131 writel_relaxed(irqs, timer->base + MCHP_PIT64B_IER); in mchp_pit64b_reset()
132 writel_relaxed(MCHP_PIT64B_CR_START, timer->base + MCHP_PIT64B_CR); in mchp_pit64b_reset()
135 static void mchp_pit64b_suspend(struct mchp_pit64b_timer *timer) in mchp_pit64b_suspend() argument
[all …]
H A Dtimer-rockchip.c44 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()
72 static void rk_timer_interrupt_clear(struct rk_timer *timer) in rk_timer_interrupt_clear() argument
[all …]
H A Ddw_apb_timer.c49 static inline u32 apbt_readl(struct dw_apb_timer *timer, unsigned long offs) in apbt_readl() argument
51 return readl(timer->base + offs); in apbt_readl()
54 static inline void apbt_writel(struct dw_apb_timer *timer, u32 val, in apbt_writel() argument
57 writel(val, timer->base + offs); in apbt_writel()
60 static inline u32 apbt_readl_relaxed(struct dw_apb_timer *timer, unsigned long offs) in apbt_readl_relaxed() argument
62 return readl_relaxed(timer->base + offs); in apbt_readl_relaxed()
65 static inline void apbt_writel_relaxed(struct dw_apb_timer *timer, u32 val, in apbt_writel_relaxed() argument
68 writel_relaxed(val, timer->base + offs); in apbt_writel_relaxed()
71 static void apbt_eoi(struct dw_apb_timer *timer) in apbt_eoi() argument
73 apbt_readl_relaxed(timer, APBTMR_N_EOI); in apbt_eoi()
[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 …]
H A Dingenic-timer.c67 to_ingenic_tcu(struct ingenic_tcu_timer *timer) in to_ingenic_tcu() argument
69 return container_of(timer, struct ingenic_tcu, timers[timer->cpu]); in to_ingenic_tcu()
80 struct ingenic_tcu_timer *timer = to_ingenic_tcu_timer(evt); in ingenic_tcu_cevt_set_state_shutdown() local
81 struct ingenic_tcu *tcu = to_ingenic_tcu(timer); in ingenic_tcu_cevt_set_state_shutdown()
83 regmap_write(tcu->map, TCU_REG_TECR, BIT(timer->channel)); in ingenic_tcu_cevt_set_state_shutdown()
91 struct ingenic_tcu_timer *timer = to_ingenic_tcu_timer(evt); in ingenic_tcu_cevt_set_next() local
92 struct ingenic_tcu *tcu = to_ingenic_tcu(timer); in ingenic_tcu_cevt_set_next()
97 regmap_write(tcu->map, TCU_REG_TDFRc(timer->channel), next); in ingenic_tcu_cevt_set_next()
98 regmap_write(tcu->map, TCU_REG_TCNTc(timer->channel), 0); in ingenic_tcu_cevt_set_next()
99 regmap_write(tcu->map, TCU_REG_TESR, BIT(timer->channel)); in ingenic_tcu_cevt_set_next()
[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.h93 struct hrtimer timer; member
97 static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) in hrtimer_set_expires() argument
99 timer->node.expires = time; in hrtimer_set_expires()
100 timer->_softexpires = time; in hrtimer_set_expires()
103 static inline void hrtimer_set_expires_range(struct hrtimer *timer, ktime_t time, ktime_t delta) in hrtimer_set_expires_range() argument
105 timer->_softexpires = time; in hrtimer_set_expires_range()
106 timer->node.expires = ktime_add_safe(time, delta); in hrtimer_set_expires_range()
109 static inline void hrtimer_set_expires_range_ns(struct hrtimer *timer, ktime_t time, u64 delta) in hrtimer_set_expires_range_ns() argument
111 timer->_softexpires = time; in hrtimer_set_expires_range_ns()
112 timer->node.expires = ktime_add_safe(time, ns_to_ktime(delta)); in hrtimer_set_expires_range_ns()
[all …]
/linux/tools/testing/selftests/kvm/arm64/
H A Darch_timer_edge_cases.c54 enum arch_timer timer; member
85 typedef void (*sleep_method_t)(enum arch_timer timer, uint64_t usec);
87 static void sleep_poll(enum arch_timer timer, uint64_t usec);
88 static void sleep_sched_poll(enum arch_timer timer, uint64_t usec);
89 static void sleep_in_userspace(enum arch_timer timer, uint64_t usec);
90 static void sleep_migrate(enum arch_timer timer, uint64_t usec);
140 static void set_counter(enum arch_timer timer, uint64_t counter) in set_counter() argument
142 GUEST_SYNC_ARGS(SET_COUNTER_VALUE, counter, timer, 0, 0); in set_counter()
148 enum arch_timer timer; in guest_irq_handler() local
159 timer = PHYSICAL; in guest_irq_handler()
[all …]
/linux/net/netfilter/
H A Dxt_IDLETIMER.c35 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()
95 struct idletimer_tg *timer = container_of(work, struct idletimer_tg, in idletimer_tg_work() local
98 sysfs_notify(idletimer_tg_kobj, NULL, timer->attr.attr.name); in idletimer_tg_work()
103 struct idletimer_tg *timer = timer_container_of(timer, t, timer); in idletimer_tg_expired() local
[all …]
/linux/arch/nios2/kernel/
H A Dtime.c42 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()
79 timer_readw(timer, ALTERA_TIMER_SNAPL_REG); in read_timersnapshot()
[all …]
/linux/sound/core/
H A Dtimer.c119 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);
188 struct snd_timer *timer; in snd_timer_find() local
190 list_for_each_entry(timer, &snd_timer_list, device_list) { in snd_timer_find()
191 if (timer->tmr_class != tid->dev_class) in snd_timer_find()
193 if ((timer->tmr_class == SNDRV_TIMER_CLASS_CARD || in snd_timer_find()
194 timer->tmr_class == SNDRV_TIMER_CLASS_PCM) && in snd_timer_find()
195 (timer->card == NULL || in snd_timer_find()
196 timer->card->number != tid->card)) in snd_timer_find()
[all …]
H A Dpcm_timer.c52 static unsigned long snd_pcm_timer_resolution(struct snd_timer * timer) in snd_pcm_timer_resolution() argument
56 substream = timer->private_data; in snd_pcm_timer_resolution()
60 static int snd_pcm_timer_start(struct snd_timer * timer) in snd_pcm_timer_start() argument
64 substream = snd_timer_chip(timer); in snd_pcm_timer_start()
69 static int snd_pcm_timer_stop(struct snd_timer * timer) in snd_pcm_timer_stop() argument
73 substream = snd_timer_chip(timer); in snd_pcm_timer_stop()
92 static void snd_pcm_timer_free(struct snd_timer *timer) in snd_pcm_timer_free() argument
94 struct snd_pcm_substream *substream = timer->private_data; in snd_pcm_timer_free()
95 substream->timer = NULL; in snd_pcm_timer_free()
101 struct snd_timer *timer; in snd_pcm_timer_init() local
[all …]
/linux/arch/s390/kernel/
H A Dvtime.c39 u64 timer; in set_vtimer() local
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()
132 timer -= lc->last_update_timer; in do_account_vtime()
135 lc->hardirq_timer += timer; in do_account_vtime()
137 lc->system_timer += timer; in do_account_vtime()
222 u64 timer = lc->last_update_timer; in vtime_delta() local
225 return timer - lc->last_update_timer; in vtime_delta()
[all …]
/linux/sound/core/seq/oss/
H A Dseq_oss_timer.c24 static void calc_alsa_tempo(struct seq_oss_timer *timer);
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()
147 snd_seq_oss_timer_start(struct seq_oss_timer *timer) in snd_seq_oss_timer_start() argument
149 struct seq_oss_devinfo *dp = timer->dp; in snd_seq_oss_timer_start()
152 if (timer->running) in snd_seq_oss_timer_start()
153 snd_seq_oss_timer_stop(timer); in snd_seq_oss_timer_start()
157 tmprec.ppq = timer->ppq; in snd_seq_oss_timer_start()
158 tmprec.tempo = timer->tempo; in snd_seq_oss_timer_start()
[all …]
/linux/kernel/time/
H A Dhrtimer.c162 struct hrtimer_clock_base *lock_hrtimer_base(const struct hrtimer *timer, in lock_hrtimer_base() argument
164 __acquires(&timer->base->lock) in lock_hrtimer_base()
169 base = READ_ONCE(timer->base); in lock_hrtimer_base()
172 if (likely(base == timer->base)) in lock_hrtimer_base()
195 static bool hrtimer_suitable_target(struct hrtimer *timer, struct hrtimer_clock_base *new_base, in hrtimer_suitable_target() argument
217 expires = ktime_sub(hrtimer_get_expires(timer), new_base->offset); in hrtimer_suitable_target()
250 switch_hrtimer_base(struct hrtimer *timer, struct hrtimer_clock_base *base, in switch_hrtimer_base() argument
272 if (unlikely(hrtimer_callback_running(timer))) in switch_hrtimer_base()
276 WRITE_ONCE(timer->base, &migration_base); in switch_hrtimer_base()
280 if (!hrtimer_suitable_target(timer, new_base, new_cpu_base, in switch_hrtimer_base()
[all …]
H A Dposix-cpu-timers.c22 static void posix_cpu_timer_rearm(struct k_itimer *timer);
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()
144 timer->it.cpu.node.expires += incr; in bump_cpu_timer()
145 timer->it_overrun += 1LL << i; in bump_cpu_timer()
148 return timer->it.cpu.node.expires; in bump_cpu_timer()
[all …]
/linux/tools/testing/selftests/kvm/include/arm64/
H A Darch_timer.h34 static inline uint64_t timer_get_cntct(enum arch_timer timer) in timer_get_cntct() argument
38 switch (timer) { in timer_get_cntct()
44 GUEST_FAIL("Unexpected timer type = %u", timer); in timer_get_cntct()
51 static inline void timer_set_cval(enum arch_timer timer, uint64_t cval) in timer_set_cval() argument
53 switch (timer) { in timer_set_cval()
61 GUEST_FAIL("Unexpected timer type = %u", timer); in timer_set_cval()
67 static inline uint64_t timer_get_cval(enum arch_timer timer) in timer_get_cval() argument
69 switch (timer) { in timer_get_cval()
75 GUEST_FAIL("Unexpected timer type = %u", timer); in timer_get_cval()
82 static inline void timer_set_tval(enum arch_timer timer, int32_t tval) in timer_set_tval() argument
[all …]
/linux/sound/isa/gus/
H A Dgus_timer.c17 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()
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()
53 static int snd_gf1_timer2_start(struct snd_timer * timer) in snd_gf1_timer2_start() argument
60 gus = snd_timer_chip(timer); in snd_gf1_timer2_start()
62 ticks = timer->sticks; in snd_gf1_timer2_start()
71 static int snd_gf1_timer2_stop(struct snd_timer * timer) in snd_gf1_timer2_stop() argument
77 gus = snd_timer_chip(timer); in snd_gf1_timer2_stop()
[all …]
/linux/tools/testing/selftests/bpf/progs/
H A Dtimer_lockup.c35 struct bpf_timer *timer; in timer_cb1() local
38 timer = bpf_map_lookup_elem(&timer2_map, &key); in timer_cb1()
39 if (timer) in timer_cb1()
40 timer2_err = bpf_timer_cancel(timer); in timer_cb1()
47 struct bpf_timer *timer; in timer_cb2() local
50 timer = bpf_map_lookup_elem(&timer1_map, &key); in timer_cb2()
51 if (timer) in timer_cb2()
52 timer1_err = bpf_timer_cancel(timer); in timer_cb2()
60 struct bpf_timer *timer; in timer1_prog() local
63 timer = bpf_map_lookup_elem(&timer1_map, &key); in timer1_prog()
[all …]
/linux/include/linux/platform_data/
H A Ddmtimer-omap.h17 int (*free)(struct omap_dm_timer *timer);
19 void (*enable)(struct omap_dm_timer *timer);
20 void (*disable)(struct omap_dm_timer *timer);
22 int (*get_irq)(struct omap_dm_timer *timer);
23 int (*set_int_enable)(struct omap_dm_timer *timer,
25 int (*set_int_disable)(struct omap_dm_timer *timer, u32 mask);
27 struct clk *(*get_fclk)(struct omap_dm_timer *timer);
29 int (*start)(struct omap_dm_timer *timer);
30 int (*stop)(struct omap_dm_timer *timer);
31 int (*set_source)(struct omap_dm_timer *timer, int source);
[all …]
/linux/arch/powerpc/sysdev/
H A Dfsl_mpic_timer_wakeup.c19 struct mpic_timer *timer; member
33 if (wakeup->timer) { in fsl_free_resource()
34 disable_irq_wake(wakeup->timer->irq); in fsl_free_resource()
35 mpic_free_timer(wakeup->timer); in fsl_free_resource()
38 wakeup->timer = NULL; in fsl_free_resource()
48 return wakeup->timer ? IRQ_HANDLED : IRQ_NONE; in fsl_mpic_timer_irq()
58 if (fsl_wakeup->timer) { in fsl_timer_wakeup_show()
59 mpic_get_remain_time(fsl_wakeup->timer, &interval); in fsl_timer_wakeup_show()
80 if (fsl_wakeup->timer) { in fsl_timer_wakeup_store()
81 disable_irq_wake(fsl_wakeup->timer->irq); in fsl_timer_wakeup_store()
[all …]
/linux/drivers/misc/
H A Dcs5535-mfgpt.c45 int cs5535_mfgpt_toggle_event(struct cs5535_mfgpt_timer *timer, int cmp, in cs5535_mfgpt_toggle_event() argument
51 if (!timer) { in cs5535_mfgpt_toggle_event()
68 mask = 1 << (timer->nr + 24); in cs5535_mfgpt_toggle_event()
73 mask = 1 << (timer->nr + shift); in cs5535_mfgpt_toggle_event()
78 mask = 1 << (timer->nr + shift); in cs5535_mfgpt_toggle_event()
97 int cs5535_mfgpt_set_irq(struct cs5535_mfgpt_timer *timer, int cmp, int *irq, in cs5535_mfgpt_set_irq() argument
103 if (!timer) { in cs5535_mfgpt_set_irq()
117 shift = ((cmp == MFGPT_CMP1 ? 0 : 4) + timer->nr % 4) * 4; in cs5535_mfgpt_set_irq()
135 if (cs5535_mfgpt_toggle_event(timer, cmp, MFGPT_EVENT_IRQ, enable)) in cs5535_mfgpt_set_irq()
149 struct cs5535_mfgpt_timer *timer = NULL; in cs5535_mfgpt_alloc_timer() local
[all …]

12345678910>>...72