ARM: restart: dove: use new restart hook
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 5 Nov 2011 09:48:52 +0000 (09:48 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 5 Jan 2012 12:57:09 +0000 (12:57 +0000)
Hook these platforms restart code into the new restart hook rather than
using arch_reset().

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-dove/cm-a510.c
arch/arm/mach-dove/common.c
arch/arm/mach-dove/common.h
arch/arm/mach-dove/dove-db-setup.c
arch/arm/mach-dove/include/mach/system.h

index c8a406f7e946f70908061b0040361a122a6c8775..792b4e2e24f1e6d719f43376f9590a3fae813359 100644 (file)
@@ -93,4 +93,5 @@ MACHINE_START(CM_A510, "Compulab CM-A510 Board")
        .init_early     = dove_init_early,
        .init_irq       = dove_init_irq,
        .timer          = &dove_timer,
+       .restart        = dove_restart,
 MACHINE_END
index a9e0dae86a26f52cccd241a686ae7555b83b48cd..13bb236cd0cdd63dc15c0093d06ca6eabdef8775 100644 (file)
@@ -292,3 +292,19 @@ void __init dove_init(void)
        dove_xor0_init();
        dove_xor1_init();
 }
+
+void dove_restart(char mode, const char *cmd)
+{
+       /*
+        * Enable soft reset to assert RSTOUTn.
+        */
+       writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
+
+       /*
+        * Assert soft reset.
+        */
+       writel(SOFT_RESET, SYSTEM_SOFT_RESET);
+
+       while (1)
+               ;
+}
index 6a2046e4470678215675c46b165a30d8a38f664d..42027305c107984f9efde233a1b4a18f6c0cc4c5 100644 (file)
@@ -39,5 +39,6 @@ void dove_spi1_init(void);
 void dove_i2c_init(void);
 void dove_sdio0_init(void);
 void dove_sdio1_init(void);
+void dove_restart(char, const char *);
 
 #endif
index 11ea34e4fc7657838d63bbc8d20d916eb0c83be0..ea77ae430b2d018f034f536471c306cf2a68db1b 100644 (file)
@@ -100,4 +100,5 @@ MACHINE_START(DOVE_DB, "Marvell DB-MV88AP510-BP Development Board")
        .init_early     = dove_init_early,
        .init_irq       = dove_init_irq,
        .timer          = &dove_timer,
+       .restart        = dove_restart,
 MACHINE_END
index 356afda56853b1667ba3e61d9d79a8eb8bae64ff..25a3a652f4bbe8b48451a81f72ae9a61b37e9db0 100644 (file)
@@ -9,8 +9,6 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <mach/bridge-regs.h>
-
 static inline void arch_idle(void)
 {
        cpu_do_idle();
@@ -18,18 +16,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-       /*
-        * Enable soft reset to assert RSTOUTn.
-        */
-       writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
-
-       /*
-        * Assert soft reset.
-        */
-       writel(SOFT_RESET, SYSTEM_SOFT_RESET);
-
-       while (1)
-               ;
 }