Lines Matching refs:clockevent

67 to_davinci_clockevent(struct clock_event_device *clockevent)  in to_davinci_clockevent()  argument
69 return container_of(clockevent, struct davinci_clockevent, dev); in to_davinci_clockevent()
73 davinci_clockevent_read(struct davinci_clockevent *clockevent, in davinci_clockevent_read() argument
76 return readl_relaxed(clockevent->base + reg); in davinci_clockevent_read()
79 static void davinci_clockevent_write(struct davinci_clockevent *clockevent, in davinci_clockevent_write() argument
82 writel_relaxed(val, clockevent->base + reg); in davinci_clockevent_write()
117 struct davinci_clockevent *clockevent; in davinci_clockevent_shutdown() local
119 clockevent = to_davinci_clockevent(dev); in davinci_clockevent_shutdown()
121 davinci_tim12_shutdown(clockevent->base); in davinci_clockevent_shutdown()
128 struct davinci_clockevent *clockevent = to_davinci_clockevent(dev); in davinci_clockevent_set_oneshot() local
130 davinci_clockevent_write(clockevent, DAVINCI_TIMER_REG_TIM12, 0x0); in davinci_clockevent_set_oneshot()
132 davinci_tim12_set_oneshot(clockevent->base); in davinci_clockevent_set_oneshot()
141 struct davinci_clockevent *clockevent = to_davinci_clockevent(dev); in davinci_clockevent_set_next_event_std() local
145 davinci_clockevent_write(clockevent, DAVINCI_TIMER_REG_TIM12, 0x0); in davinci_clockevent_set_next_event_std()
146 davinci_clockevent_write(clockevent, DAVINCI_TIMER_REG_PRD12, cycles); in davinci_clockevent_set_next_event_std()
157 struct davinci_clockevent *clockevent = to_davinci_clockevent(dev); in davinci_clockevent_set_next_event_cmp() local
160 curr_time = davinci_clockevent_read(clockevent, in davinci_clockevent_set_next_event_cmp()
162 davinci_clockevent_write(clockevent, in davinci_clockevent_set_next_event_cmp()
163 clockevent->cmp_off, curr_time + cycles); in davinci_clockevent_set_next_event_cmp()
170 struct davinci_clockevent *clockevent = data; in davinci_timer_irq_timer() local
172 if (!clockevent_state_oneshot(&clockevent->dev)) in davinci_timer_irq_timer()
173 davinci_tim12_shutdown(clockevent->base); in davinci_timer_irq_timer()
175 clockevent->dev.event_handler(&clockevent->dev); in davinci_timer_irq_timer()
245 struct davinci_clockevent *clockevent; in davinci_timer_register() local
272 clockevent = kzalloc(sizeof(*clockevent), GFP_KERNEL); in davinci_timer_register()
273 if (!clockevent) in davinci_timer_register()
276 clockevent->dev.name = "tim12"; in davinci_timer_register()
277 clockevent->dev.features = CLOCK_EVT_FEAT_ONESHOT; in davinci_timer_register()
278 clockevent->dev.cpumask = cpumask_of(0); in davinci_timer_register()
279 clockevent->base = base; in davinci_timer_register()
282 clockevent->cmp_off = timer_cfg->cmp_off; in davinci_timer_register()
283 clockevent->dev.set_next_event = in davinci_timer_register()
286 clockevent->dev.set_next_event = in davinci_timer_register()
288 clockevent->dev.set_state_oneshot = in davinci_timer_register()
290 clockevent->dev.set_state_shutdown = in davinci_timer_register()
296 "clockevent/tim12", clockevent); in davinci_timer_register()
319 clockevents_config_and_register(&clockevent->dev, tick_rate, in davinci_timer_register()