Skip to content

Commit c18e52c

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

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

arch/m68knommu/platform/5307/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>
@@ -22,8 +21,6 @@
2221

2322
/***************************************************************************/
2423

25-
void coldfire_reset(void);
26-
2724
extern unsigned int mcf_timervector;
2825
extern unsigned int mcf_profilevector;
2926
extern unsigned int mcf_timerlevel;
@@ -119,6 +116,17 @@ void mcf_settimericr(unsigned int timer, unsigned int level)
119116

120117
/***************************************************************************/
121118

119+
void m5307_cpu_reset(void)
120+
{
121+
local_irq_disable();
122+
/* Set watchdog to soft reset, and enabled */
123+
__raw_writeb(0xc0, MCF_MBAR + MCFSIM_SYPCR);
124+
for (;;)
125+
/* wait for watchdog to timeout */;
126+
}
127+
128+
/***************************************************************************/
129+
122130
void __init config_BSP(char *commandp, int size)
123131
{
124132
mcf_setimr(MCFSIM_IMR_MASKALL);
@@ -134,7 +142,7 @@ void __init config_BSP(char *commandp, int size)
134142
mcf_timerlevel = 6;
135143
#endif
136144

137-
mach_reset = coldfire_reset;
145+
mach_reset = m5307_cpu_reset;
138146

139147
#ifdef CONFIG_BDM_DISABLE
140148
/*

0 commit comments

Comments
 (0)