Skip to content

Commit 384feb9

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

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

arch/m68k/include/asm/m532xsim.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,18 @@
125125
#define ACR_CM_OFF_IMP (3<<5)
126126
#define ACR_WPROTECT (1<<2)
127127

128+
/*********************************************************************
129+
*
130+
* Reset Controller Module
131+
*
132+
*********************************************************************/
133+
134+
#define MCF_RCR 0xFC0A0000
135+
#define MCF_RSR 0xFC0A0001
136+
137+
#define MCF_RCR_SWRESET 0x80 /* Software reset bit */
138+
#define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */
139+
128140
/*********************************************************************
129141
*
130142
* Inter-IC (I2C) Module

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131

3232
/***************************************************************************/
3333

34-
void coldfire_reset(void);
35-
3634
extern unsigned int mcf_timervector;
3735
extern unsigned int mcf_profilevector;
3836
extern unsigned int mcf_timerlevel;
@@ -164,6 +162,14 @@ void mcf_settimericr(unsigned int timer, unsigned int level)
164162

165163
/***************************************************************************/
166164

165+
static void m532x_cpu_reset(void)
166+
{
167+
local_irq_disable();
168+
__raw_writeb(MCF_RCR_SWRESET, MCF_RCR);
169+
}
170+
171+
/***************************************************************************/
172+
167173
void __init config_BSP(char *commandp, int size)
168174
{
169175
mcf_setimr(MCFSIM_IMR_MASKALL);
@@ -181,7 +187,7 @@ void __init config_BSP(char *commandp, int size)
181187

182188
mcf_timervector = 64+32;
183189
mcf_profilevector = 64+33;
184-
mach_reset = coldfire_reset;
190+
mach_reset = m532x_cpu_reset;
185191

186192
#ifdef CONFIG_BDM_DISABLE
187193
/*

0 commit comments

Comments
 (0)