Skip to content

Commit

Permalink
tile/time: Migrate to new 'set-state' interface
Browse files Browse the repository at this point in the history
Migrate tile 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.

Cc: Chris Metcalf <cmetcalf@ezchip.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
  • Loading branch information
vireshk authored and Chris Metcalf committed Jul 30, 2015
1 parent 52721d9 commit 38715df
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions arch/tile/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ static int tile_timer_set_next_event(unsigned long ticks,
* Whenever anyone tries to change modes, we just mask interrupts
* and wait for the next event to get set.
*/
static void tile_timer_set_mode(enum clock_event_mode mode,
struct clock_event_device *evt)
static int tile_timer_shutdown(struct clock_event_device *evt)
{
arch_local_irq_mask_now(INT_TILE_TIMER);
return 0;
}

/*
Expand All @@ -157,7 +157,9 @@ static DEFINE_PER_CPU(struct clock_event_device, tile_timer) = {
.rating = 100,
.irq = -1,
.set_next_event = tile_timer_set_next_event,
.set_mode = tile_timer_set_mode,
.set_state_shutdown = tile_timer_shutdown,
.set_state_oneshot = tile_timer_shutdown,
.tick_resume = tile_timer_shutdown,
};

void setup_tile_timer(void)
Expand Down

0 comments on commit 38715df

Please sign in to comment.