Commit a54868b4 authored by Viresh Kumar's avatar Viresh Kumar Committed by Olof Johansson

ARM: ep93xx/timer: Migrate to new 'set-state' interface

Migrate EP93xx driver to the new 'set-state' interface provided by
clockevents core, the earlier 'set-mode' interface is marked obsolete
now.

This also enables us to implement callbacks for new states of clockevent
devices, for example: ONESHOT_STOPPED.
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parent 4f2f1f76
...@@ -86,19 +86,22 @@ static int ep93xx_clkevt_set_next_event(unsigned long next, ...@@ -86,19 +86,22 @@ static int ep93xx_clkevt_set_next_event(unsigned long next,
} }
static void ep93xx_clkevt_set_mode(enum clock_event_mode mode, static int ep93xx_clkevt_shutdown(struct clock_event_device *evt)
struct clock_event_device *evt)
{ {
/* Disable timer */ /* Disable timer */
writel(0, EP93XX_TIMER3_CONTROL); writel(0, EP93XX_TIMER3_CONTROL);
return 0;
} }
static struct clock_event_device ep93xx_clockevent = { static struct clock_event_device ep93xx_clockevent = {
.name = "timer1", .name = "timer1",
.features = CLOCK_EVT_FEAT_ONESHOT, .features = CLOCK_EVT_FEAT_ONESHOT,
.set_mode = ep93xx_clkevt_set_mode, .set_state_shutdown = ep93xx_clkevt_shutdown,
.set_next_event = ep93xx_clkevt_set_next_event, .set_state_oneshot = ep93xx_clkevt_shutdown,
.rating = 300, .tick_resume = ep93xx_clkevt_shutdown,
.set_next_event = ep93xx_clkevt_set_next_event,
.rating = 300,
}; };
static irqreturn_t ep93xx_timer_interrupt(int irq, void *dev_id) static irqreturn_t ep93xx_timer_interrupt(int irq, void *dev_id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment