aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2009-04-30 03:15:18 -0400
committerGreg Ungerer <gerg@uclinux.org>2009-06-10 23:09:09 -0400
commiteb7c874d5c81dae6d7b80857e9f0dab1a5d05ebd (patch)
treeb9cdb30b446006b0329b436f0b0ff12b64e10393 /arch
parentc18e52c7696e39c7cb23cd083bbda5652c338b79 (diff)
m68knommu: add CPU reset code for the 5407 ColdFire
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/m68knommu/platform/5407/config.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/m68knommu/platform/5407/config.c b/arch/m68knommu/platform/5407/config.c
index 0ee8c1a200c8..b41d942bf8d0 100644
--- a/arch/m68knommu/platform/5407/config.c
+++ b/arch/m68knommu/platform/5407/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
24void coldfire_reset(void);
25
26extern unsigned int mcf_timervector; 23extern unsigned int mcf_timervector;
27extern unsigned int mcf_profilevector; 24extern unsigned int mcf_profilevector;
28extern unsigned int mcf_timerlevel; 25extern unsigned int mcf_timerlevel;
@@ -110,6 +107,17 @@ void mcf_settimericr(unsigned int timer, unsigned int level)
110 107
111/***************************************************************************/ 108/***************************************************************************/
112 109
110void m5407_cpu_reset(void)
111{
112 local_irq_disable();
113 /* set watchdog to soft reset, and enabled */
114 __raw_writeb(0xc0, MCF_MBAR + MCFSIM_SYPCR);
115 for (;;)
116 /* wait for watchdog to timeout */;
117}
118
119/***************************************************************************/
120
113void __init config_BSP(char *commandp, int size) 121void __init config_BSP(char *commandp, int size)
114{ 122{
115 mcf_setimr(MCFSIM_IMR_MASKALL); 123 mcf_setimr(MCFSIM_IMR_MASKALL);
@@ -121,7 +129,7 @@ void __init config_BSP(char *commandp, int size)
121 mcf_timerlevel = 6; 129 mcf_timerlevel = 6;
122#endif 130#endif
123 131
124 mach_reset = coldfire_reset; 132 mach_reset = m5407_cpu_reset;
125} 133}
126 134
127/***************************************************************************/ 135/***************************************************************************/