20 #include <linux/module.h>
33 static u32 mfgpt_base;
55 static void init_mfgpt_timer(
enum clock_event_mode
mode,
56 struct clock_event_device *
evt)
58 spin_lock(&mfgpt_lock);
61 case CLOCK_EVT_MODE_PERIODIC:
67 case CLOCK_EVT_MODE_SHUTDOWN:
68 case CLOCK_EVT_MODE_UNUSED:
69 if (evt->mode == CLOCK_EVT_MODE_PERIODIC ||
70 evt->mode == CLOCK_EVT_MODE_ONESHOT)
74 case CLOCK_EVT_MODE_ONESHOT:
78 case CLOCK_EVT_MODE_RESUME:
82 spin_unlock(&mfgpt_lock);
85 static struct clock_event_device mfgpt_clockevent = {
87 .features = CLOCK_EVT_FEAT_PERIODIC,
88 .set_mode = init_mfgpt_timer,
107 mfgpt_clockevent.event_handler(&mfgpt_clockevent);
125 struct clock_event_device *
cd = &mfgpt_clockevent;
157 static int old_count;
188 if (count < old_count && jifs == old_jifs)
194 spin_unlock_irqrestore(&mfgpt_lock, flags);