| /linux/drivers/clocksource/ |
| H A D | timer-ti-dm.c | 33 #include <clocksource/timer-ti-dm.h> 37 * timer errata flags 41 * timer counter register is never read. For more details please refer to 159 * dmtimer_read - read timer registers in posted and non-posted mode 160 * @timer: timer pointer over which read operation to perform 167 static inline u32 dmtimer_read(struct dmtimer *timer, u32 reg) in dmtimer_read() argument 175 if (wp && timer->posted) in dmtimer_read() 176 while (readl_relaxed(timer->pend) & wp) in dmtimer_read() 179 return readl_relaxed(timer->func_base + offset); in dmtimer_read() 183 * dmtimer_write - write timer registers in posted and non-posted mode [all …]
|
| H A D | timer-zevio.c | 3 * 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 D | timer-microchip-pit64b.c | 3 * 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 D | timer-rockchip.c | 3 * 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 D | bcm2835_timer.c | 46 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 D | ingenic-timer.c | 67 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 …]
|
| H A D | timer-cadence-ttc.c | 3 * This file contains driver for the Cadence Triple Timer Counter Rev 06 7 * based on arch/mips/kernel/time.c timer driver 25 * T1: Timer 1, clocksource for generic timekeeping 26 * T2: Timer 2, clockevent source for hrtimers 27 * T3: Timer 3, <unused> 29 * The input frequency to the timer module for emulation is 2.5MHz which is 30 * common to all the timer channels (T1, T2, and T3). With a pre-scaler of 32, 33 * The input frequency to the timer module in silicon is configurable and 38 * Timer Register Offset Definitions of Timer 1, Increment base address by 4 39 * and use same offsets for Timer 2 [all …]
|
| /linux/drivers/rtc/ |
| H A D | rtc-brcmstb-waketimer.c | 48 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 D | hrtimer.h | 21 #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 …]
|
| /linux/tools/testing/selftests/kvm/arm64/ |
| H A D | arch_timer_edge_cases.c | 3 * arch_timer_edge_cases.c - Tests the aarch64 timer IRQ functionality. 5 * The test validates some edge cases related to the arch-timer: 11 * - masking/unmasking using the timer control mask. 53 /* Virtual or physical timer and counter tests. */ 54 enum arch_timer timer; member 55 /* Delay used for most timer tests. */ 61 /* Whether to test the physical timer. */ 63 /* Whether to test the virtual timer. */ 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); [all …]
|
| /linux/net/netfilter/ |
| H A D | xt_IDLETIMER.c | 5 * 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/sound/core/ |
| H A D | timer.c | 19 #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 …]
|
| H A D | pcm_timer.c | 11 #include <sound/timer.h> 16 * Timer functions 44 "pcm timer resolution out of range (rate = %u, period_size = %lu)\n", in snd_pcm_timer_resolution_change() 52 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 [all …]
|
| /linux/arch/s390/kernel/ |
| H A D | vtime.c | 3 * 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 D | ti,timer-dm.yaml | 4 $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 D | rockchip,rk-timer.yaml | 4 $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/arch/nios2/kernel/ |
| H A D | time.c | 22 #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 D | rz-mtu3.h | 13 #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 D | seq_oss_timer.c | 5 * 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 D | timer.c | 13 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 D | timer.c | 12 * ktime_to_tick() - Scale ktime_t to timer tick value. 28 enum hrtimer_restart kvm_swtimer_wakeup(struct hrtimer *timer) in kvm_swtimer_wakeup() argument 32 vcpu = container_of(timer, struct kvm_vcpu, arch.swtimer); in kvm_swtimer_wakeup() 40 * Initialise the timer to the specified frequency, zero it 51 * Restore soft timer state from saved context. 61 * Set guest stable timer cfg csr in kvm_restore_timer() 62 * Disable timer before restore estat CSR register, avoid to in kvm_restore_timer() 63 * get invalid timer interrupt for old timer cfg in kvm_restore_timer() 71 /* Guest timer is disabled, just restore timer registers */ in kvm_restore_timer() 77 * Freeze the soft-timer and sync the guest stable timer with it. in kvm_restore_timer() [all …]
|
| /linux/arch/powerpc/sysdev/ |
| H A D | fsl_gtm.c | 38 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 …]
|
| /linux/include/trace/events/ |
| H A D | timer.h | 3 #define TRACE_SYSTEM timer 10 #include <linux/timer.h> 14 TP_PROTO(struct timer_list *timer), 16 TP_ARGS(timer), 19 __field( void *, timer ) 23 __entry->timer = timer; 26 TP_printk("timer=%p", __entry->timer) 30 * timer_init - called when the timer is initialized 31 * @timer: pointer to struct timer_list 35 TP_PROTO(struct timer_list *timer), [all …]
|
| /linux/include/linux/platform_data/ |
| H A D | dmtimer-omap.h | 17 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/drivers/isdn/mISDN/ |
| H A D | timerdev.c | 4 * general timer device for using in ISDN stacks 14 #include <linux/timer.h> 68 struct mISDNtimer *timer, *next; in mISDN_close() local 75 timer = list_first_entry(list, struct mISDNtimer, list); in mISDN_close() 77 timer_shutdown_sync(&timer->tl); in mISDN_close() 80 list_del(&timer->list); in mISDN_close() 81 kfree(timer); in mISDN_close() 85 list_for_each_entry_safe(timer, next, &dev->expired, list) { in mISDN_close() 86 kfree(timer); in mISDN_close() 97 struct mISDNtimer *timer; in mISDN_read() local [all …]
|