From 80be2ed5399556cdcf714c09ac16187b6480cdf7 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Thu, 30 Apr 2009 23:15:56 +1000 Subject: [PATCH] --- yaml --- r: 147800 b: refs/heads/master c: dd65b1de553ddfd85e8fea9d3aa9db7479ccf2aa h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/m68k/include/asm/m528xsim.h | 8 ++++++++ trunk/arch/m68knommu/platform/528x/config.c | 13 +++++++++---- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index e8e178556575..b0140df48223 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4c0b008d49e728735f54419e60446480017bfe1b +refs/heads/master: dd65b1de553ddfd85e8fea9d3aa9db7479ccf2aa diff --git a/trunk/arch/m68k/include/asm/m528xsim.h b/trunk/arch/m68k/include/asm/m528xsim.h index 28bf783a5d6d..d79c49f8134a 100644 --- a/trunk/arch/m68k/include/asm/m528xsim.h +++ b/trunk/arch/m68k/include/asm/m528xsim.h @@ -56,6 +56,14 @@ #define MCF5282_INTC0_ICR17 (volatile u8 *) (MCF_IPSBAR + 0x0C51) +/* + * Reset Control Unit (relative to IPSBAR). + */ +#define MCF_RCR 0x110000 +#define MCF_RSR 0x110001 + +#define MCF_RCR_SWRESET 0x80 /* Software reset bit */ +#define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */ /********************************************************************* * diff --git a/trunk/arch/m68knommu/platform/528x/config.c b/trunk/arch/m68knommu/platform/528x/config.c index bee526f4d1af..a1d1a61c4fe6 100644 --- a/trunk/arch/m68knommu/platform/528x/config.c +++ b/trunk/arch/m68knommu/platform/528x/config.c @@ -31,10 +31,6 @@ /***************************************************************************/ -void coldfire_reset(void); - -/***************************************************************************/ - static struct mcf_platform_uart m528x_uart_platform[] = { { .mapbase = MCF_MBAR + MCFUART_BASE1, @@ -171,6 +167,14 @@ void mcf_autovector(unsigned int vec) /***************************************************************************/ +static void m528x_cpu_reset(void) +{ + local_irq_disable(); + __raw_writeb(MCF_RCR_SWRESET, MCF_IPSBAR + MCF_RCR); +} + +/***************************************************************************/ + #ifdef CONFIG_WILDFIRE void wildfire_halt(void) { @@ -214,6 +218,7 @@ void __init config_BSP(char *commandp, int size) static int __init init_BSP(void) { + mach_reset = m528x_cpu_reset; m528x_uarts_init(); m528x_fec_init(); platform_add_devices(m528x_devices, ARRAY_SIZE(m528x_devices));