Skip to content

Commit eb7c874

Browse files
committed
m68knommu: add CPU reset code for the 5407 ColdFire
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
1 parent c18e52c commit eb7c874

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

arch/m68knommu/platform/5407/config.c

Lines changed: 12 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;
@@ -110,6 +107,17 @@ void mcf_settimericr(unsigned int timer, unsigned int level)
110107

111108
/***************************************************************************/
112109

110+
void 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+
113121
void __init config_BSP(char *commandp, int size)
114122
{
115123
mcf_setimr(MCFSIM_IMR_MASKALL);
@@ -121,7 +129,7 @@ void __init config_BSP(char *commandp, int size)
121129
mcf_timerlevel = 6;
122130
#endif
123131

124-
mach_reset = coldfire_reset;
132+
mach_reset = m5407_cpu_reset;
125133
}
126134

127135
/***************************************************************************/

0 commit comments

Comments
 (0)