ARM: restart: integrator: use new restart hook
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 3 Nov 2011 19:54:37 +0000 (19:54 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 5 Jan 2012 12:57:13 +0000 (12:57 +0000)
Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-integrator/common.h
arch/arm/mach-integrator/core.c
arch/arm/mach-integrator/include/mach/system.h
arch/arm/mach-integrator/integrator_ap.c
arch/arm/mach-integrator/integrator_cp.c

index a08f9b0299dfa43090b564ca39f20cfdf4325a9c..899561d8db285c475459799b03b4dd7619c8273b 100644 (file)
@@ -1,2 +1,3 @@
 void integrator_init_early(void);
 void integrator_reserve(void);
+void integrator_restart(char, const char *);
index 4b38e13667acf0f316e8881305c065f939c5d2cb..0a3e0974398aeb678ebbc65c019b7ebbf362396a 100644 (file)
@@ -238,3 +238,11 @@ void __init integrator_reserve(void)
 {
        memblock_reserve(PHYS_OFFSET, __pa(swapper_pg_dir) - PHYS_OFFSET);
 }
+
+/*
+ * To reset, we hit the on-board reset register in the system FPGA
+ */
+void integrator_restart(char mode, const char *cmd)
+{
+       cm_control(CM_CTRL_RESET, CM_CTRL_RESET);
+}
index e1551b8dab77448687a8752df3f839ccb274f9d3..12fc8c3157c3b8d5e677fc7dc40aef89b2db4bea 100644 (file)
@@ -21,8 +21,6 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <mach/cm.h>
-
 static inline void arch_idle(void)
 {
        /*
@@ -34,11 +32,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-       /*
-        * To reset, we hit the on-board reset register
-        * in the system FPGA
-        */
-       cm_control(CM_CTRL_RESET, CM_CTRL_RESET);
 }
 
 #endif
index a1769f35a86e35013f32cc5fc05d7da6abe3239c..21a1d6cbef40c43dad90ff3fc9da70d550f78fe9 100644 (file)
@@ -472,4 +472,5 @@ MACHINE_START(INTEGRATOR, "ARM-Integrator")
        .init_irq       = ap_init_irq,
        .timer          = &ap_timer,
        .init_machine   = ap_init,
+       .restart        = integrator_restart,
 MACHINE_END
index 5de49c33e4d4eb70129614b7aeff6fa4afaa7ad6..3a730d447c9a1f6365d560f94d9553190bf9ef9f 100644 (file)
@@ -499,4 +499,5 @@ MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP")
        .init_irq       = intcp_init_irq,
        .timer          = &cp_timer,
        .init_machine   = intcp_init,
+       .restart        = integrator_restart,
 MACHINE_END