Lines Matching refs:evt
24 struct clock_event_device evt; member
70 struct hpet_channel *clockevent_to_channel(struct clock_event_device *evt) in clockevent_to_channel() argument
72 return container_of(evt, struct hpet_channel, evt); in clockevent_to_channel()
295 static int hpet_clkevt_set_state_periodic(struct clock_event_device *evt) in hpet_clkevt_set_state_periodic() argument
297 unsigned int channel = clockevent_to_channel(evt)->num; in hpet_clkevt_set_state_periodic()
302 delta = ((uint64_t)(NSEC_PER_SEC / HZ)) * evt->mult; in hpet_clkevt_set_state_periodic()
303 delta >>= evt->shift; in hpet_clkevt_set_state_periodic()
326 static int hpet_clkevt_set_state_oneshot(struct clock_event_device *evt) in hpet_clkevt_set_state_oneshot() argument
328 unsigned int channel = clockevent_to_channel(evt)->num; in hpet_clkevt_set_state_oneshot()
339 static int hpet_clkevt_set_state_shutdown(struct clock_event_device *evt) in hpet_clkevt_set_state_shutdown() argument
341 unsigned int channel = clockevent_to_channel(evt)->num; in hpet_clkevt_set_state_shutdown()
351 static int hpet_clkevt_legacy_resume(struct clock_event_device *evt) in hpet_clkevt_legacy_resume() argument
359 hpet_clkevt_set_next_event(unsigned long delta, struct clock_event_device *evt) in hpet_clkevt_set_next_event() argument
361 unsigned int channel = clockevent_to_channel(evt)->num; in hpet_clkevt_set_next_event()
398 struct clock_event_device *evt = &hc->evt; in hpet_init_clockevent() local
400 evt->rating = rating; in hpet_init_clockevent()
401 evt->irq = hc->irq; in hpet_init_clockevent()
402 evt->name = hc->name; in hpet_init_clockevent()
403 evt->cpumask = cpumask_of(hc->cpu); in hpet_init_clockevent()
404 evt->set_state_oneshot = hpet_clkevt_set_state_oneshot; in hpet_init_clockevent()
405 evt->set_next_event = hpet_clkevt_set_next_event; in hpet_init_clockevent()
406 evt->set_state_shutdown = hpet_clkevt_set_state_shutdown; in hpet_init_clockevent()
408 evt->features = CLOCK_EVT_FEAT_ONESHOT; in hpet_init_clockevent()
410 evt->features |= CLOCK_EVT_FEAT_PERIODIC; in hpet_init_clockevent()
411 evt->set_state_periodic = hpet_clkevt_set_state_periodic; in hpet_init_clockevent()
425 hc->evt.tick_resume = hpet_clkevt_legacy_resume; in hpet_legacy_clockevent_register()
455 hc->evt.features |= CLOCK_EVT_FEAT_PERIODIC; in hpet_legacy_clockevent_register()
456 hc->evt.set_state_periodic = hpet_clkevt_set_state_periodic; in hpet_legacy_clockevent_register()
461 clockevents_config_and_register(&hc->evt, hpet_freq, in hpet_legacy_clockevent_register()
463 global_clock_event = &hc->evt; in hpet_legacy_clockevent_register()
498 static int hpet_clkevt_msi_resume(struct clock_event_device *evt) in hpet_clkevt_msi_resume() argument
500 struct hpet_channel *hc = clockevent_to_channel(evt); in hpet_clkevt_msi_resume()
514 struct clock_event_device *evt = &hc->evt; in hpet_msi_interrupt_handler() local
516 if (!evt->event_handler) { in hpet_msi_interrupt_handler()
521 evt->event_handler(evt); in hpet_msi_interrupt_handler()
544 struct clock_event_device *evt = &hc->evt; in init_one_hpet_msi_clockevent() local
551 evt->tick_resume = hpet_clkevt_msi_resume; in init_one_hpet_msi_clockevent()
553 clockevents_config_and_register(evt, hpet_freq, HPET_MIN_PROG_DELTA, in init_one_hpet_msi_clockevent()
1091 struct clock_event_device *evt = &hpet_base.channels[0].evt; in hpet_rtc_timer_init() local
1094 clc = (uint64_t) evt->mult * NSEC_PER_SEC; in hpet_rtc_timer_init()
1095 clc >>= evt->shift + DEFAULT_RTC_SHIFT; in hpet_rtc_timer_init()
1189 struct clock_event_device *evt = &hpet_base.channels[0].evt; in hpet_set_periodic_freq() local
1191 clc = (uint64_t) evt->mult * NSEC_PER_SEC; in hpet_set_periodic_freq()
1193 clc >>= evt->shift; in hpet_set_periodic_freq()