24 #include <linux/time.h>
30 #include <mach/hardware.h>
31 #include <mach/platform.h>
34 static int lpc32xx_clkevt_next_event(
unsigned long delta,
35 struct clock_event_device *
dev)
46 static void lpc32xx_clkevt_mode(
enum clock_event_mode
mode,
47 struct clock_event_device *dev)
50 case CLOCK_EVT_MODE_PERIODIC:
54 case CLOCK_EVT_MODE_ONESHOT:
55 case CLOCK_EVT_MODE_SHUTDOWN:
64 case CLOCK_EVT_MODE_UNUSED:
65 case CLOCK_EVT_MODE_RESUME:
70 static struct clock_event_device lpc32xx_clkevt = {
71 .name =
"lpc32xx_clkevt",
72 .features = CLOCK_EVT_FEAT_ONESHOT,
75 .set_next_event = lpc32xx_clkevt_next_event,
76 .set_mode = lpc32xx_clkevt_mode,
81 struct clock_event_device *
evt = &lpc32xx_clkevt;
87 evt->event_handler(evt);
92 static struct irqaction lpc32xx_timer_irq = {
93 .name =
"LPC32XX Timer Tick",
95 .handler = lpc32xx_timer_interrupt,
103 static void __init lpc32xx_timer_init(
void)
145 lpc32xx_clkevt.shift);
149 &lpc32xx_clkevt) + 1;
166 .init = &lpc32xx_timer_init,