aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/blackfin/kernel/gptimers.c48
1 files changed, 16 insertions, 32 deletions
diff --git a/arch/blackfin/kernel/gptimers.c b/arch/blackfin/kernel/gptimers.c
index 8b81dc04488a..64ef2ebbc22f 100644
--- a/arch/blackfin/kernel/gptimers.c
+++ b/arch/blackfin/kernel/gptimers.c
@@ -25,49 +25,33 @@
25 25
26#define BFIN_TIMER_NUM_GROUP (BFIN_TIMER_OCTET(MAX_BLACKFIN_GPTIMERS - 1) + 1) 26#define BFIN_TIMER_NUM_GROUP (BFIN_TIMER_OCTET(MAX_BLACKFIN_GPTIMERS - 1) + 1)
27 27
28typedef struct { 28static struct bfin_gptimer_regs * const timer_regs[MAX_BLACKFIN_GPTIMERS] =
29 uint16_t config;
30 uint16_t __pad;
31 uint32_t counter;
32 uint32_t period;
33 uint32_t width;
34} GPTIMER_timer_regs;
35
36typedef struct {
37 uint16_t enable;
38 uint16_t __pad0;
39 uint16_t disable;
40 uint16_t __pad1;
41 uint32_t status;
42} GPTIMER_group_regs;
43
44static volatile GPTIMER_timer_regs *const timer_regs[MAX_BLACKFIN_GPTIMERS] =
45{ 29{
46 (GPTIMER_timer_regs *)TIMER0_CONFIG, 30 (void *)TIMER0_CONFIG,
47 (GPTIMER_timer_regs *)TIMER1_CONFIG, 31 (void *)TIMER1_CONFIG,
48 (GPTIMER_timer_regs *)TIMER2_CONFIG, 32 (void *)TIMER2_CONFIG,
49#if (MAX_BLACKFIN_GPTIMERS > 3) 33#if (MAX_BLACKFIN_GPTIMERS > 3)
50 (GPTIMER_timer_regs *)TIMER3_CONFIG, 34 (void *)TIMER3_CONFIG,
51 (GPTIMER_timer_regs *)TIMER4_CONFIG, 35 (void *)TIMER4_CONFIG,
52 (GPTIMER_timer_regs *)TIMER5_CONFIG, 36 (void *)TIMER5_CONFIG,
53 (GPTIMER_timer_regs *)TIMER6_CONFIG, 37 (void *)TIMER6_CONFIG,
54 (GPTIMER_timer_regs *)TIMER7_CONFIG, 38 (void *)TIMER7_CONFIG,
55# if (MAX_BLACKFIN_GPTIMERS > 8) 39# if (MAX_BLACKFIN_GPTIMERS > 8)
56 (GPTIMER_timer_regs *)TIMER8_CONFIG, 40 (void *)TIMER8_CONFIG,
57 (GPTIMER_timer_regs *)TIMER9_CONFIG, 41 (void *)TIMER9_CONFIG,
58 (GPTIMER_timer_regs *)TIMER10_CONFIG, 42 (void *)TIMER10_CONFIG,
59# if (MAX_BLACKFIN_GPTIMERS > 11) 43# if (MAX_BLACKFIN_GPTIMERS > 11)
60 (GPTIMER_timer_regs *)TIMER11_CONFIG, 44 (void *)TIMER11_CONFIG,
61# endif 45# endif
62# endif 46# endif
63#endif 47#endif
64}; 48};
65 49
66static volatile GPTIMER_group_regs *const group_regs[BFIN_TIMER_NUM_GROUP] = 50static struct bfin_gptimer_group_regs * const group_regs[BFIN_TIMER_NUM_GROUP] =
67{ 51{
68 (GPTIMER_group_regs *)TIMER0_GROUP_REG, 52 (void *)TIMER0_GROUP_REG,
69#if (MAX_BLACKFIN_GPTIMERS > 8) 53#if (MAX_BLACKFIN_GPTIMERS > 8)
70 (GPTIMER_group_regs *)TIMER8_GROUP_REG, 54 (void *)TIMER8_GROUP_REG,
71#endif 55#endif
72}; 56};
73 57