11 #include <linux/kernel.h>
12 #include <linux/module.h>
19 # define tassert(expr)
21 # define tassert(expr) \
23 printk(KERN_DEBUG "%s:%s:%i: Assertion failed: " #expr "\n", __FILE__, __func__, __LINE__);
27 # define BFIN_TIMER_NUM_GROUP (BFIN_TIMER_OCTET(MAX_BLACKFIN_GPTIMERS - 1) + 1)
29 # define BFIN_TIMER_NUM_GROUP 1
58 (
void *)TIMER8_GROUP_REG,
67 #if (MAX_BLACKFIN_GPTIMERS > 3)
73 # if (MAX_BLACKFIN_GPTIMERS > 8)
77 # if (MAX_BLACKFIN_GPTIMERS > 11)
89 #if (MAX_BLACKFIN_GPTIMERS > 3)
95 # if (MAX_BLACKFIN_GPTIMERS > 8)
99 # if (MAX_BLACKFIN_GPTIMERS > 11)
111 #if (MAX_BLACKFIN_GPTIMERS > 3)
117 # if (MAX_BLACKFIN_GPTIMERS > 8)
121 # if (MAX_BLACKFIN_GPTIMERS > 11)
146 bfin_write(&timer_regs[timer_id]->period, period);
166 void set_gptimer_delay(
unsigned int timer_id,
uint32_t delay)
169 bfin_write(&timer_regs[timer_id]->delay, delay);
174 uint32_t get_gptimer_delay(
unsigned int timer_id)
221 return bfin_read(&group_regs[group]->data_ilat);
228 bfin_write(&group_regs[group]->data_ilat, value);
248 static uint32_t read_gptimer_status(
unsigned int timer_id)
256 return !!(read_gptimer_status(timer_id) & timil_mask[timer_id]);
270 return !!(read_gptimer_status(timer_id) & tovf_mask[timer_id]);
284 return !!(read_gptimer_status(timer_id) & trun_mask[timer_id]);
292 bfin_write(&timer_regs[timer_id]->config, config);
337 _disable_gptimers(mask);
343 _disable_gptimers(mask);
350 _disable_gptimers(mask);