ARM: restart: netx: use new restart hook
authorRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 11 Nov 2011 15:12:17 +0000 (15:12 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 5 Jan 2012 12:57:16 +0000 (12:57 +0000)
Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-netx/generic.c
arch/arm/mach-netx/generic.h
arch/arm/mach-netx/include/mach/system.h
arch/arm/mach-netx/nxdb500.c
arch/arm/mach-netx/nxdkn.c
arch/arm/mach-netx/nxeb500hmi.c

index 00023b5..59e6797 100644 (file)
@@ -187,3 +187,8 @@ static int __init netx_init(void)
 
 subsys_initcall(netx_init);
 
+void netx_restart(char mode, const char *cmd)
+{
+       writel(NETX_SYSTEM_RES_CR_FIRMW_RES_EN | NETX_SYSTEM_RES_CR_FIRMW_RES,
+              NETX_SYSTEM_RES_CR);
+}
index ede2d35..9b91511 100644 (file)
@@ -19,6 +19,7 @@
 
 extern void __init netx_map_io(void);
 extern void __init netx_init_irq(void);
+extern void netx_restart(char, const char *);
 
 struct sys_timer;
 extern struct sys_timer netx_timer;
index dc7b4bc..83ae2b1 100644 (file)
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <linux/io.h>
-#include <mach/hardware.h>
-#include "netx-regs.h"
-
 static inline void arch_idle(void)
 {
        cpu_do_idle();
@@ -30,8 +26,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-       writel(NETX_SYSTEM_RES_CR_FIRMW_RES_EN | NETX_SYSTEM_RES_CR_FIRMW_RES,
-              NETX_SYSTEM_RES_CR);
 }
 
 #endif
index 90903dd..5384b5a 100644 (file)
@@ -205,4 +205,5 @@ MACHINE_START(NXDB500, "Hilscher nxdb500")
        .init_irq       = netx_init_irq,
        .timer          = &netx_timer,
        .init_machine   = nxdb500_init,
+       .restart        = netx_restart,
 MACHINE_END
index c63384a..2df3783 100644 (file)
@@ -98,4 +98,5 @@ MACHINE_START(NXDKN, "Hilscher nxdkn")
        .init_irq       = netx_init_irq,
        .timer          = &netx_timer,
        .init_machine   = nxdkn_init,
+       .restart        = netx_restart,
 MACHINE_END
index 8f548ec..26255b2 100644 (file)
@@ -182,4 +182,5 @@ MACHINE_START(NXEB500HMI, "Hilscher nxeb500hmi")
        .init_irq       = netx_init_irq,
        .timer          = &netx_timer,
        .init_machine   = nxeb500hmi_init,
+       .restart        = netx_restart,
 MACHINE_END