Skip to content

Commit

Permalink
Blackfin: gptimers: add enable/disable by timer id
Browse files Browse the repository at this point in the history
The API is geared around timer ids, except for the act of enabling
and disabling timers.  So add a small helper to fill out the gap.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
  • Loading branch information
Mike Frysinger committed Jul 23, 2011
1 parent 353470c commit e1b5596
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arch/blackfin/include/asm/gptimers.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,16 @@ uint16_t get_enabled_gptimers(void);
uint32_t get_gptimer_status(unsigned int group);
void set_gptimer_status(unsigned int group, uint32_t value);

static inline void enable_gptimer(unsigned int timer_id)
{
enable_gptimers(1 << timer_id);
}

static inline void disable_gptimer(unsigned int timer_id)
{
disable_gptimers(1 << timer_id);
}

/*
* All Blackfin system MMRs are padded to 32bits even if the register
* itself is only 16bits. So use a helper macro to streamline this.
Expand Down

0 comments on commit e1b5596

Please sign in to comment.