Skip to content

Commit 25ce4a9

Browse files
committed
m68knommu: move CPU reset code for the 520x ColdFire into its platform code
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
1 parent 384feb9 commit 25ce4a9

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

arch/m68k/include/asm/m520xsim.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,14 @@
5959
#define MCFPIT_IMR MCFINTC_IMRL
6060
#define MCFPIT_IMR_IBIT (1 << MCFINT_PIT1)
6161

62+
/*
63+
* Reset Controll Unit.
64+
*/
65+
#define MCF_RCR 0xFC0A0000
66+
#define MCF_RSR 0xFC0A0001
67+
68+
#define MCF_RCR_SWRESET 0x80 /* Software reset bit */
69+
#define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */
70+
6271
/****************************************************************************/
6372
#endif /* m520xsim_h */

arch/m68knommu/platform/520x/config.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include <linux/kernel.h>
1515
#include <linux/param.h>
1616
#include <linux/init.h>
17-
#include <linux/interrupt.h>
1817
#include <linux/io.h>
1918
#include <asm/machdep.h>
2019
#include <asm/coldfire.h>
@@ -23,10 +22,6 @@
2322

2423
/***************************************************************************/
2524

26-
void coldfire_reset(void);
27-
28-
/***************************************************************************/
29-
3025
static struct mcf_platform_uart m520x_uart_platform[] = {
3126
{
3227
.mapbase = MCF_MBAR + MCFUART_BASE1,
@@ -169,9 +164,17 @@ void mcf_autovector(unsigned int vec)
169164

170165
/***************************************************************************/
171166

167+
static void m520x_cpu_reset(void)
168+
{
169+
local_irq_disable();
170+
__raw_writeb(MCF_RCR_SWRESET, MCF_RCR);
171+
}
172+
173+
/***************************************************************************/
174+
172175
void __init config_BSP(char *commandp, int size)
173176
{
174-
mach_reset = coldfire_reset;
177+
mach_reset = m520x_cpu_reset;
175178
m520x_uarts_init();
176179
m520x_fec_init();
177180
}

0 commit comments

Comments
 (0)