12
12
#include <linux/kernel.h>
13
13
#include <linux/param.h>
14
14
#include <linux/init.h>
15
- #include <linux/interrupt.h>
16
15
#include <linux/io.h>
17
16
#include <asm/machdep.h>
18
17
#include <asm/coldfire.h>
21
20
22
21
/***************************************************************************/
23
22
24
- void coldfire_reset (void );
25
-
26
23
extern unsigned int mcf_timervector ;
27
24
extern unsigned int mcf_profilevector ;
28
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
183
void __init config_BSP (char * commandp , int size )
174
184
{
175
185
#if defined (CONFIG_MOD5272 )
@@ -194,7 +204,7 @@ void __init config_BSP(char *commandp, int size)
194
204
195
205
mcf_timervector = 69 ;
196
206
mcf_profilevector = 70 ;
197
- mach_reset = coldfire_reset ;
207
+ mach_reset = m5272_cpu_reset ;
198
208
}
199
209
200
210
/***************************************************************************/
0 commit comments