diff options
author | Greg Ungerer <gerg@uclinux.org> | 2009-05-19 00:52:40 -0400 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2009-09-15 19:43:51 -0400 |
commit | 04b75b10dceadf937e3707ecc3dfccf6a076fd29 (patch) | |
tree | 87965d12b8f7eb622efd1d36bebd2a7b8a26452e /arch/m68knommu/platform/5272 | |
parent | f9311f26434cea3e926f56ca2aa3e5740e962c72 (diff) |
m68knommu: simplify ColdFire "timers" clock initialization
The ColdFire "timers" clock setup can be simplified. There is really no
need for the flexible per-platform setup code. The clock interrupt can be
hard defined per CPU platform (in CPU include files). This makes the
actual timer code simpler.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68knommu/platform/5272')
-rw-r--r-- | arch/m68knommu/platform/5272/config.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c index 94a66c12c96..b16add9aa4e 100644 --- a/arch/m68knommu/platform/5272/config.c +++ b/arch/m68knommu/platform/5272/config.c | |||
@@ -20,12 +20,6 @@ | |||
20 | 20 | ||
21 | /***************************************************************************/ | 21 | /***************************************************************************/ |
22 | 22 | ||
23 | extern unsigned int mcf_timervector; | ||
24 | extern unsigned int mcf_profilevector; | ||
25 | extern unsigned int mcf_timerlevel; | ||
26 | |||
27 | /***************************************************************************/ | ||
28 | |||
29 | /* | 23 | /* |
30 | * Some platforms need software versions of the GPIO data registers. | 24 | * Some platforms need software versions of the GPIO data registers. |
31 | */ | 25 | */ |
@@ -148,14 +142,15 @@ void mcf_disableall(void) | |||
148 | 142 | ||
149 | /***************************************************************************/ | 143 | /***************************************************************************/ |
150 | 144 | ||
151 | void mcf_settimericr(int timer, int level) | 145 | static void __init m5272_timers_init(void) |
152 | { | 146 | { |
153 | volatile unsigned long *icrp; | 147 | /* Timer1 @ level6 is always used as system timer */ |
148 | writel((0x8 | 0x6) << ((4 - 1) * 4), MCF_MBAR + MCFSIM_ICR1); | ||
154 | 149 | ||
155 | if ((timer >= 1 ) && (timer <= 4)) { | 150 | #ifdef CONFIG_HIGHPROFILE |
156 | icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1); | 151 | /* Timer2 @ level7 is to be used as a high speed profile timer */ |
157 | *icrp = (0x8 | level) << ((4 - timer) * 4); | 152 | writel((0x8 | 0x7) << ((4 - 2) * 4), MCF_MBAR + MCFSIM_ICR1); |
158 | } | 153 | #endif |
159 | } | 154 | } |
160 | 155 | ||
161 | /***************************************************************************/ | 156 | /***************************************************************************/ |
@@ -195,9 +190,8 @@ void __init config_BSP(char *commandp, int size) | |||
195 | commandp[size-1] = 0; | 190 | commandp[size-1] = 0; |
196 | #endif | 191 | #endif |
197 | 192 | ||
198 | mcf_timervector = 69; | ||
199 | mcf_profilevector = 70; | ||
200 | mach_reset = m5272_cpu_reset; | 193 | mach_reset = m5272_cpu_reset; |
194 | m5272_timers_init(); | ||
201 | } | 195 | } |
202 | 196 | ||
203 | /***************************************************************************/ | 197 | /***************************************************************************/ |