Skip to content

Commit dd65b1d

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

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

arch/m68k/include/asm/m528xsim.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@
5656
#define MCF5282_INTC0_ICR17 (volatile u8 *) (MCF_IPSBAR + 0x0C51)
5757

5858

59+
/*
60+
* Reset Control Unit (relative to IPSBAR).
61+
*/
62+
#define MCF_RCR 0x110000
63+
#define MCF_RSR 0x110001
64+
65+
#define MCF_RCR_SWRESET 0x80 /* Software reset bit */
66+
#define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */
5967

6068
/*********************************************************************
6169
*

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

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

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

34-
void coldfire_reset(void);
35-
36-
/***************************************************************************/
37-
3834
static struct mcf_platform_uart m528x_uart_platform[] = {
3935
{
4036
.mapbase = MCF_MBAR + MCFUART_BASE1,
@@ -171,6 +167,14 @@ void mcf_autovector(unsigned int vec)
171167

172168
/***************************************************************************/
173169

170+
static void m528x_cpu_reset(void)
171+
{
172+
local_irq_disable();
173+
__raw_writeb(MCF_RCR_SWRESET, MCF_IPSBAR + MCF_RCR);
174+
}
175+
176+
/***************************************************************************/
177+
174178
#ifdef CONFIG_WILDFIRE
175179
void wildfire_halt(void)
176180
{
@@ -214,6 +218,7 @@ void __init config_BSP(char *commandp, int size)
214218

215219
static int __init init_BSP(void)
216220
{
221+
mach_reset = m528x_cpu_reset;
217222
m528x_uarts_init();
218223
m528x_fec_init();
219224
platform_add_devices(m528x_devices, ARRAY_SIZE(m528x_devices));

0 commit comments

Comments
 (0)