Commit e1b55965337e2c0cd26055ce446c506448c08e6d

Authored by Mike Frysinger
1 parent 353470cc50

Blackfin: gptimers: add enable/disable by timer id

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>

Showing 1 changed file with 10 additions and 0 deletions Side-by-side Diff

arch/blackfin/include/asm/gptimers.h
... ... @@ -193,6 +193,16 @@
193 193 uint32_t get_gptimer_status(unsigned int group);
194 194 void set_gptimer_status(unsigned int group, uint32_t value);
195 195  
  196 +static inline void enable_gptimer(unsigned int timer_id)
  197 +{
  198 + enable_gptimers(1 << timer_id);
  199 +}
  200 +
  201 +static inline void disable_gptimer(unsigned int timer_id)
  202 +{
  203 + disable_gptimers(1 << timer_id);
  204 +}
  205 +
196 206 /*
197 207 * All Blackfin system MMRs are padded to 32bits even if the register
198 208 * itself is only 16bits. So use a helper macro to streamline this.