aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-06-17 11:45:23 -0400
committerMike Frysinger <vapier@gentoo.org>2011-07-23 01:18:22 -0400
commite1b55965337e2c0cd26055ce446c506448c08e6d (patch)
treeadd157281fd227f45cdafc8223e5731b5994829a
parent353470cc5092400bbb08921016005ce03aa37f33 (diff)
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>
-rw-r--r--arch/blackfin/include/asm/gptimers.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/gptimers.h b/arch/blackfin/include/asm/gptimers.h
index 9275804d4e2a..38bddcb190c8 100644
--- a/arch/blackfin/include/asm/gptimers.h
+++ b/arch/blackfin/include/asm/gptimers.h
@@ -193,6 +193,16 @@ uint16_t get_enabled_gptimers(void);
193uint32_t get_gptimer_status(unsigned int group); 193uint32_t get_gptimer_status(unsigned int group);
194void set_gptimer_status(unsigned int group, uint32_t value); 194void set_gptimer_status(unsigned int group, uint32_t value);
195 195
196static inline void enable_gptimer(unsigned int timer_id)
197{
198 enable_gptimers(1 << timer_id);
199}
200
201static inline void disable_gptimer(unsigned int timer_id)
202{
203 disable_gptimers(1 << timer_id);
204}
205
196/* 206/*
197 * All Blackfin system MMRs are padded to 32bits even if the register 207 * All Blackfin system MMRs are padded to 32bits even if the register
198 * itself is only 16bits. So use a helper macro to streamline this. 208 * itself is only 16bits. So use a helper macro to streamline this.