Skip to content

Commit 55b33f3

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

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

arch/m68k/include/asm/m523xsim.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,14 @@
4141
#define MCFSIM_DACR1 0x50 /* SDRAM base address 1 */
4242
#define MCFSIM_DMR1 0x54 /* SDRAM address mask 1 */
4343

44+
/*
45+
* Reset Controll Unit (relative to IPSBAR).
46+
*/
47+
#define MCF_RCR 0x110000
48+
#define MCF_RSR 0x110001
49+
50+
#define MCF_RCR_SWRESET 0x80 /* Software reset bit */
51+
#define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */
52+
4453
/****************************************************************************/
4554
#endif /* m523xsim_h */

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

Lines changed: 8 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 m523x_uart_platform[] = {
3227
{
3328
.mapbase = MCF_MBAR + MCFUART_BASE1,
@@ -145,13 +140,20 @@ void mcf_autovector(unsigned int vec)
145140
{
146141
/* Everything is auto-vectored on the 523x */
147142
}
143+
/***************************************************************************/
144+
145+
static void m523x_cpu_reset(void)
146+
{
147+
local_irq_disable();
148+
__raw_writeb(MCF_RCR_SWRESET, MCF_IPSBAR + MCF_RCR);
149+
}
148150

149151
/***************************************************************************/
150152

151153
void __init config_BSP(char *commandp, int size)
152154
{
153155
mcf_disableall();
154-
mach_reset = coldfire_reset;
156+
mach_reset = m523x_cpu_reset;
155157
m523x_uarts_init();
156158
m523x_fec_init();
157159
}

0 commit comments

Comments
 (0)