diff options
Diffstat (limited to 'arch/blackfin/include/asm/gptimers.h')
-rw-r--r-- | arch/blackfin/include/asm/gptimers.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/gptimers.h b/arch/blackfin/include/asm/gptimers.h index 38657dac1235..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); | |||
193 | uint32_t get_gptimer_status(unsigned int group); | 193 | uint32_t get_gptimer_status(unsigned int group); |
194 | void set_gptimer_status(unsigned int group, uint32_t value); | 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 | * 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. |
@@ -209,6 +219,15 @@ struct bfin_gptimer_regs { | |||
209 | u32 width; | 219 | u32 width; |
210 | }; | 220 | }; |
211 | 221 | ||
222 | /* | ||
223 | * bfin group timer registers layout | ||
224 | */ | ||
225 | struct bfin_gptimer_group_regs { | ||
226 | __BFP(enable); | ||
227 | __BFP(disable); | ||
228 | u32 status; | ||
229 | }; | ||
230 | |||
212 | #undef __BFP | 231 | #undef __BFP |
213 | 232 | ||
214 | #endif | 233 | #endif |