Skip to content

Commit 6f5aa7c

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

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

arch/m68knommu/platform/5249/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>
@@ -20,10 +19,6 @@
2019

2120
/***************************************************************************/
2221

23-
void coldfire_reset(void);
24-
25-
/***************************************************************************/
26-
2722
static struct mcf_platform_uart m5249_uart_platform[] = {
2823
{
2924
.mapbase = MCF_MBAR + MCFUART_BASE1,
@@ -106,10 +101,21 @@ void mcf_settimericr(unsigned int timer, unsigned int level)
106101

107102
/***************************************************************************/
108103

104+
void m5249_cpu_reset(void)
105+
{
106+
local_irq_disable();
107+
/* Set watchdog to soft reset, and enabled */
108+
__raw_writeb(0xc0, MCF_MBAR + MCFSIM_SYPCR);
109+
for (;;)
110+
/* wait for watchdog to timeout */;
111+
}
112+
113+
/***************************************************************************/
114+
109115
void __init config_BSP(char *commandp, int size)
110116
{
111117
mcf_setimr(MCFSIM_IMR_MASKALL);
112-
mach_reset = coldfire_reset;
118+
mach_reset = m5249_cpu_reset;
113119
}
114120

115121
/***************************************************************************/

0 commit comments

Comments
 (0)