ARM: restart: orion5x: use new restart hook
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 5 Nov 2011 10:13:41 +0000 (10:13 +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().

In addition, convert calls to arm_machine_restart() to orion5x_restart()
to ensure that they continue to work as intended.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
24 files changed:
arch/arm/mach-orion5x/common.c
arch/arm/mach-orion5x/common.h
arch/arm/mach-orion5x/d2net-setup.c
arch/arm/mach-orion5x/db88f5281-setup.c
arch/arm/mach-orion5x/dns323-setup.c
arch/arm/mach-orion5x/edmini_v2-setup.c
arch/arm/mach-orion5x/include/mach/system.h
arch/arm/mach-orion5x/kurobox_pro-setup.c
arch/arm/mach-orion5x/ls-chl-setup.c
arch/arm/mach-orion5x/ls_hgl-setup.c
arch/arm/mach-orion5x/lsmini-setup.c
arch/arm/mach-orion5x/mss2-setup.c
arch/arm/mach-orion5x/mv2120-setup.c
arch/arm/mach-orion5x/net2big-setup.c
arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
arch/arm/mach-orion5x/rd88f5182-setup.c
arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
arch/arm/mach-orion5x/terastation_pro2-setup.c
arch/arm/mach-orion5x/ts209-setup.c
arch/arm/mach-orion5x/ts409-setup.c
arch/arm/mach-orion5x/ts78xx-setup.c
arch/arm/mach-orion5x/wnr854t-setup.c
arch/arm/mach-orion5x/wrt350n-v2-setup.c

index 22ace0b..41127e8 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/mbus.h>
 #include <linux/mv643xx_i2c.h>
 #include <linux/ata_platform.h>
+#include <linux/delay.h>
 #include <net/dsa.h>
 #include <asm/page.h>
 #include <asm/setup.h>
@@ -304,6 +305,17 @@ void __init orion5x_init(void)
        orion5x_wdt_init();
 }
 
+void orion5x_restart(char mode, const char *cmd)
+{
+       /*
+        * Enable and issue soft reset
+        */
+       orion5x_setbits(RSTOUTn_MASK, (1 << 2));
+       orion5x_setbits(CPU_SOFT_RESET, 1);
+       mdelay(200);
+       orion5x_clrbits(CPU_SOFT_RESET, 1);
+}
+
 /*
  * Many orion-based systems have buggy bootloader implementations.
  * This is a common fixup for bogus memory tags.
index 909489f..37ef18d 100644 (file)
@@ -39,6 +39,7 @@ void orion5x_spi_init(void);
 void orion5x_uart0_init(void);
 void orion5x_uart1_init(void);
 void orion5x_xor_init(void);
+void orion5x_restart(char, const char *);
 
 /*
  * PCIe/PCI functions.
index 8c83009..d75dcfa 100644 (file)
@@ -343,6 +343,7 @@ MACHINE_START(D2NET, "LaCie d2 Network")
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
        .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END
 #endif
 
@@ -355,6 +356,7 @@ MACHINE_START(BIGDISK, "LaCie Big Disk Network")
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
        .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END
 #endif
 
index 4b79a80..a104d5a 100644 (file)
@@ -364,4 +364,5 @@ MACHINE_START(DB88F5281, "Marvell Orion-2 Development Board")
        .init_early     = orion5x_init_early,
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
+       .restart        = orion5x_restart,
 MACHINE_END
index 343f60e..91b0f47 100644 (file)
@@ -736,4 +736,5 @@ MACHINE_START(DNS323, "D-Link DNS-323")
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
        .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END
index 70a4e92..355e962 100644 (file)
@@ -258,4 +258,5 @@ MACHINE_START(EDMINI_V2, "LaCie Ethernet Disk mini V2")
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
        .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END
index a1d6e46..6677677 100644 (file)
@@ -11,8 +11,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();
@@ -20,14 +18,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-       /*
-        * Enable and issue soft reset
-        */
-       orion5x_setbits(RSTOUTn_MASK, (1 << 2));
-       orion5x_setbits(CPU_SOFT_RESET, 1);
-       mdelay(200);
-       orion5x_clrbits(CPU_SOFT_RESET, 1);
 }
 
-
 #endif
index d3cd3f6..47587b8 100644 (file)
@@ -386,6 +386,7 @@ MACHINE_START(KUROBOX_PRO, "Buffalo/Revogear Kurobox Pro")
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
        .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END
 #endif
 
@@ -399,5 +400,6 @@ MACHINE_START(LINKSTATION_PRO, "Buffalo Linkstation Pro/Live")
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
        .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END
 #endif
index 9503fff..5272131 100644 (file)
@@ -140,7 +140,7 @@ static struct mv_sata_platform_data lschl_sata_data = {
 
 static void lschl_power_off(void)
 {
-       arm_machine_restart('h', NULL);
+       orion5x_restart('h', NULL);
 }
 
 /*****************************************************************************
@@ -325,4 +325,5 @@ MACHINE_START(LINKSTATION_LSCHL, "Buffalo Linkstation LiveV3 (LS-CHL)")
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
        .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END
index ed6d772..9a8697b 100644 (file)
@@ -186,7 +186,7 @@ static struct mv_sata_platform_data ls_hgl_sata_data = {
 
 static void ls_hgl_power_off(void)
 {
-       arm_machine_restart('h', NULL);
+       orion5x_restart('h', NULL);
 }
 
 
@@ -272,4 +272,5 @@ MACHINE_START(LINKSTATION_LS_HGL, "Buffalo Linkstation LS-HGL")
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
        .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END
index 743f7f1..09c7365 100644 (file)
@@ -186,7 +186,7 @@ static struct mv_sata_platform_data lsmini_sata_data = {
 
 static void lsmini_power_off(void)
 {
-       arm_machine_restart('h', NULL);
+       orion5x_restart('h', NULL);
 }
 
 
@@ -274,5 +274,6 @@ MACHINE_START(LINKSTATION_MINI, "Buffalo Linkstation Mini")
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
        .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END
 #endif
index 6020e26..65faaa3 100644 (file)
@@ -267,5 +267,6 @@ MACHINE_START(MSS2, "Maxtor Shared Storage II")
        .init_early     = orion5x_init_early,
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
-       .fixup          = tag_fixup_mem32
+       .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END
index 201ae36..c87fde4 100644 (file)
@@ -234,5 +234,6 @@ MACHINE_START(MV2120, "HP Media Vault mv2120")
        .init_early     = orion5x_init_early,
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
-       .fixup          = tag_fixup_mem32
+       .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END
index 6197c79..0180c39 100644 (file)
@@ -426,5 +426,6 @@ MACHINE_START(NET2BIG, "LaCie 2Big Network")
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
        .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END
 
index ebd6767..292038f 100644 (file)
@@ -175,4 +175,5 @@ MACHINE_START(RD88F5181L_FXO, "Marvell Orion-VoIP FXO Reference Design")
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
        .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END
index 05db2d3..c44eaba 100644 (file)
@@ -187,4 +187,5 @@ MACHINE_START(RD88F5181L_GE, "Marvell Orion-VoIP GE Reference Design")
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
        .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END
index e47fa05..96438b6 100644 (file)
@@ -311,4 +311,5 @@ MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design")
        .init_early     = orion5x_init_early,
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
+       .restart        = orion5x_restart,
 MACHINE_END
index 6431725..2c5fab0 100644 (file)
@@ -128,4 +128,5 @@ MACHINE_START(RD88F6183AP_GE, "Marvell Orion-1-90 AP GE Reference Design")
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
        .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END
index 29f1526..632a861 100644 (file)
@@ -364,4 +364,5 @@ MACHINE_START(TERASTATION_PRO2, "Buffalo Terastation Pro II/Live")
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
        .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END
index 31e51f9..62c156b 100644 (file)
@@ -329,4 +329,5 @@ MACHINE_START(TS209, "QNAP TS-109/TS-209")
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
        .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END
index 0fbcc14..4e6ff75 100644 (file)
@@ -318,4 +318,5 @@ MACHINE_START(TS409, "QNAP TS-409")
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
        .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END
index b35e200..c96f374 100644 (file)
@@ -627,4 +627,5 @@ MACHINE_START(TS78XX, "Technologic Systems TS-78xx SBC")
        .init_early     = orion5x_init_early,
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
+       .restart        = orion5x_restart,
 MACHINE_END
index b8be7d8..078c03f 100644 (file)
@@ -179,4 +179,5 @@ MACHINE_START(WNR854T, "Netgear WNR854T")
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
        .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END
index faf81a0..46a9778 100644 (file)
@@ -267,4 +267,5 @@ MACHINE_START(WRT350N_V2, "Linksys WRT350N v2")
        .init_irq       = orion5x_init_irq,
        .timer          = &orion5x_timer,
        .fixup          = tag_fixup_mem32,
+       .restart        = orion5x_restart,
 MACHINE_END