Skip to content

Commit 05728ae

Browse files
committed
m68knommu: move CPU reset code for the 5272 ColdFire into its platform code
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
1 parent dd65b1d commit 05728ae

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

arch/m68knommu/platform/5272/config.c

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <linux/kernel.h>
1313
#include <linux/param.h>
1414
#include <linux/init.h>
15-
#include <linux/interrupt.h>
1615
#include <linux/io.h>
1716
#include <asm/machdep.h>
1817
#include <asm/coldfire.h>
@@ -21,8 +20,6 @@
2120

2221
/***************************************************************************/
2322

24-
void coldfire_reset(void);
25-
2623
extern unsigned int mcf_timervector;
2724
extern unsigned int mcf_profilevector;
2825
extern unsigned int mcf_timerlevel;
@@ -170,6 +167,19 @@ void mcf_settimericr(int timer, int level)
170167

171168
/***************************************************************************/
172169

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+
173183
void __init config_BSP(char *commandp, int size)
174184
{
175185
#if defined (CONFIG_MOD5272)
@@ -194,7 +204,7 @@ void __init config_BSP(char *commandp, int size)
194204

195205
mcf_timervector = 69;
196206
mcf_profilevector = 70;
197-
mach_reset = coldfire_reset;
207+
mach_reset = m5272_cpu_reset;
198208
}
199209

200210
/***************************************************************************/

0 commit comments

Comments
 (0)