Commit e1b55965 authored by Mike Frysinger's avatar Mike Frysinger

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: default avatarMike Frysinger <vapier@gentoo.org>
parent 353470cc
...@@ -193,6 +193,16 @@ uint16_t get_enabled_gptimers(void); ...@@ -193,6 +193,16 @@ uint16_t get_enabled_gptimers(void);
uint32_t get_gptimer_status(unsigned int group); uint32_t get_gptimer_status(unsigned int group);
void set_gptimer_status(unsigned int group, uint32_t value); 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 * All Blackfin system MMRs are padded to 32bits even if the register
* itself is only 16bits. So use a helper macro to streamline this. * itself is only 16bits. So use a helper macro to streamline this.
......
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