ARM: restart: mv78xx0: use new restart hook
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 5 Nov 2011 10:09:15 +0000 (10:09 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 5 Jan 2012 12:57:15 +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-mv78xx0/buffalo-wxl-setup.c
arch/arm/mach-mv78xx0/common.c
arch/arm/mach-mv78xx0/common.h
arch/arm/mach-mv78xx0/db78x00-bp-setup.c
arch/arm/mach-mv78xx0/include/mach/system.h
arch/arm/mach-mv78xx0/rd78x00-masa-setup.c

index 0e94268..ee74ec9 100644 (file)
@@ -151,4 +151,5 @@ MACHINE_START(TERASTATION_WXL, "Buffalo Nas WXL")
        .init_early     = mv78xx0_init_early,
        .init_irq       = mv78xx0_init_irq,
        .timer          = &mv78xx0_timer,
+       .restart        = mv78xx0_restart,
 MACHINE_END
index 23d3980..5b9632b 100644 (file)
@@ -401,3 +401,19 @@ void __init mv78xx0_init(void)
        feroceon_l2_init(is_l2_writethrough());
 #endif
 }
+
+void mv78xx0_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 632e63d..07d5f8f 100644 (file)
@@ -46,6 +46,7 @@ void mv78xx0_uart1_init(void);
 void mv78xx0_uart2_init(void);
 void mv78xx0_uart3_init(void);
 void mv78xx0_i2c_init(void);
+void mv78xx0_restart(char, const char *);
 
 extern struct sys_timer mv78xx0_timer;
 
index 50b85ae..4d6d48b 100644 (file)
@@ -99,4 +99,5 @@ MACHINE_START(DB78X00_BP, "Marvell DB-78x00-BP Development Board")
        .init_early     = mv78xx0_init_early,
        .init_irq       = mv78xx0_init_irq,
        .timer          = &mv78xx0_timer,
+       .restart        = mv78xx0_restart,
 MACHINE_END
index 66e7ce4..1ae3585 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)
-               ;
 }
 
 
index e85222e..9a88270 100644 (file)
@@ -84,4 +84,5 @@ MACHINE_START(RD78X00_MASA, "Marvell RD-78x00-MASA Development Board")
        .init_early     = mv78xx0_init_early,
        .init_irq       = mv78xx0_init_irq,
        .timer          = &mv78xx0_timer,
+       .restart        = mv78xx0_restart,
 MACHINE_END