diff options
author | Greg Ungerer <gerg@uclinux.org> | 2009-04-30 09:32:52 -0400 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2009-06-10 23:09:10 -0400 |
commit | 05728aec8b05ec3fa859add8b22ba46432611e9e (patch) | |
tree | 386201901e856d64bbb9795389922102f91ab742 /arch | |
parent | dd65b1de553ddfd85e8fea9d3aa9db7479ccf2aa (diff) |
m68knommu: move CPU reset code for the 5272 ColdFire into its platform code
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/m68knommu/platform/5272/config.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c index e049245f4092..5f95fcde05fd 100644 --- a/arch/m68knommu/platform/5272/config.c +++ b/arch/m68knommu/platform/5272/config.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/param.h> | 13 | #include <linux/param.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/interrupt.h> | ||
16 | #include <linux/io.h> | 15 | #include <linux/io.h> |
17 | #include <asm/machdep.h> | 16 | #include <asm/machdep.h> |
18 | #include <asm/coldfire.h> | 17 | #include <asm/coldfire.h> |
@@ -21,8 +20,6 @@ | |||
21 | 20 | ||
22 | /***************************************************************************/ | 21 | /***************************************************************************/ |
23 | 22 | ||
24 | void coldfire_reset(void); | ||
25 | |||
26 | extern unsigned int mcf_timervector; | 23 | extern unsigned int mcf_timervector; |
27 | extern unsigned int mcf_profilevector; | 24 | extern unsigned int mcf_profilevector; |
28 | extern unsigned int mcf_timerlevel; | 25 | extern unsigned int mcf_timerlevel; |
@@ -170,6 +167,19 @@ void mcf_settimericr(int timer, int level) | |||
170 | 167 | ||
171 | /***************************************************************************/ | 168 | /***************************************************************************/ |
172 | 169 | ||
170 | static void m5272_cpu_reset(void) | ||
171 | { | ||
172 | local_irq_disable(); | ||
173 | /* Set watchdog to reset, and enabled */ | ||
174 | __raw_writew(0, MCF_MBAR + MCFSIM_WIRR); | ||
175 | __raw_writew(1, MCF_MBAR + MCFSIM_WRRR); | ||
176 | __raw_writew(0, MCF_MBAR + MCFSIM_WCR); | ||
177 | for (;;) | ||
178 | /* wait for watchdog to timeout */; | ||
179 | } | ||
180 | |||
181 | /***************************************************************************/ | ||
182 | |||
173 | void __init config_BSP(char *commandp, int size) | 183 | void __init config_BSP(char *commandp, int size) |
174 | { | 184 | { |
175 | #if defined (CONFIG_MOD5272) | 185 | #if defined (CONFIG_MOD5272) |
@@ -194,7 +204,7 @@ void __init config_BSP(char *commandp, int size) | |||
194 | 204 | ||
195 | mcf_timervector = 69; | 205 | mcf_timervector = 69; |
196 | mcf_profilevector = 70; | 206 | mcf_profilevector = 70; |
197 | mach_reset = coldfire_reset; | 207 | mach_reset = m5272_cpu_reset; |
198 | } | 208 | } |
199 | 209 | ||
200 | /***************************************************************************/ | 210 | /***************************************************************************/ |