]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
m68knommu: move CPU reset code for the 528x ColdFire into its platform code
authorGreg Ungerer <gerg@uclinux.org>
Thu, 30 Apr 2009 13:15:56 +0000 (23:15 +1000)
committerGreg Ungerer <gerg@uclinux.org>
Thu, 11 Jun 2009 03:09:10 +0000 (13:09 +1000)
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
arch/m68k/include/asm/m528xsim.h
arch/m68knommu/platform/528x/config.c

index 28bf783a5d6df7302d03371ae7ad6528750eb064..d79c49f8134ab05583aa8ef91f88ca60b161d71c 100644 (file)
 #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 */
 
 /*********************************************************************
 *
index bee526f4d1af7c94bf65fe11aaec08be3c0f8c85..a1d1a61c4fe667188fc1979df0630d7f5c7a547f 100644 (file)
 
 /***************************************************************************/
 
-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));