12 #include <asm/param.h>
25 static void itimer_set_mode(
enum clock_event_mode
mode,
26 struct clock_event_device *
evt)
29 case CLOCK_EVT_MODE_PERIODIC:
33 case CLOCK_EVT_MODE_SHUTDOWN:
34 case CLOCK_EVT_MODE_UNUSED:
35 case CLOCK_EVT_MODE_ONESHOT:
39 case CLOCK_EVT_MODE_RESUME:
44 static int itimer_next_event(
unsigned long delta,
45 struct clock_event_device *evt)
50 static struct clock_event_device itimer_clockevent = {
54 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
55 .set_mode = itimer_set_mode,
56 .set_next_event = itimer_next_event,
63 (*itimer_clockevent.event_handler)(&itimer_clockevent);
81 static void __init setup_itimer(
void)
88 "errno = %d\n", -err);
91 itimer_clockevent.max_delta_ns =
93 itimer_clockevent.min_delta_ns =
95 err = clocksource_register_hz(&itimer_clocksource,
USEC_PER_SEC);