Skip to content

Commit 4c0b008

Browse files
committed
m68knommu: move CPU reset code for the 527x ColdFire into its platform code
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
1 parent 55b33f3 commit 4c0b008

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

arch/m68k/include/asm/m527xsim.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,14 @@
7070
#define UART2_ENABLE_MASK 0x3f00
7171
#endif
7272

73+
/*
74+
* Reset Controll Unit (relative to IPSBAR).
75+
*/
76+
#define MCF_RCR 0x110000
77+
#define MCF_RSR 0x110001
78+
79+
#define MCF_RCR_SWRESET 0x80 /* Software reset bit */
80+
#define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */
81+
7382
/****************************************************************************/
7483
#endif /* m527xsim_h */

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <linux/kernel.h>
1616
#include <linux/param.h>
1717
#include <linux/init.h>
18-
#include <linux/interrupt.h>
1918
#include <linux/io.h>
2019
#include <asm/machdep.h>
2120
#include <asm/coldfire.h>
@@ -24,10 +23,6 @@
2423

2524
/***************************************************************************/
2625

27-
void coldfire_reset(void);
28-
29-
/***************************************************************************/
30-
3126
static struct mcf_platform_uart m527x_uart_platform[] = {
3227
{
3328
.mapbase = MCF_MBAR + MCFUART_BASE1,
@@ -227,10 +222,18 @@ void mcf_autovector(unsigned int vec)
227222

228223
/***************************************************************************/
229224

225+
static void m527x_cpu_reset(void)
226+
{
227+
local_irq_disable();
228+
__raw_writeb(MCF_RCR_SWRESET, MCF_IPSBAR + MCF_RCR);
229+
}
230+
231+
/***************************************************************************/
232+
230233
void __init config_BSP(char *commandp, int size)
231234
{
232235
mcf_disableall();
233-
mach_reset = coldfire_reset;
236+
mach_reset = m527x_cpu_reset;
234237
m527x_uarts_init();
235238
m527x_fec_init();
236239
}

0 commit comments

Comments
 (0)