Skip to content

Commit b61a726

Browse files
committed
m68knommu: add CPU reset code for the 5206e ColdFire
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
1 parent 851377b commit b61a726

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

arch/m68knommu/platform/5206e/config.c

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

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

24-
void coldfire_reset(void);
25-
26-
/***************************************************************************/
27-
2823
static struct mcf_platform_uart m5206e_uart_platform[] = {
2924
{
3025
.mapbase = MCF_MBAR + MCFUART_BASE1,
@@ -109,6 +104,17 @@ void mcf_settimericr(unsigned int timer, unsigned int level)
109104

110105
/***************************************************************************/
111106

107+
void m5206e_cpu_reset(void)
108+
{
109+
local_irq_disable();
110+
/* Set watchdog to soft reset, and enabled */
111+
__raw_writeb(0xc0, MCF_MBAR + MCFSIM_SYPCR);
112+
for (;;)
113+
/* wait for watchdog to timeout */;
114+
}
115+
116+
/***************************************************************************/
117+
112118
void __init config_BSP(char *commandp, int size)
113119
{
114120
mcf_setimr(MCFSIM_IMR_MASKALL);
@@ -119,7 +125,7 @@ void __init config_BSP(char *commandp, int size)
119125
commandp[size-1] = 0;
120126
#endif /* CONFIG_NETtel */
121127

122-
mach_reset = coldfire_reset;
128+
mach_reset = m5206e_cpu_reset;
123129
}
124130

125131
/***************************************************************************/

0 commit comments

Comments
 (0)