]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
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>
Sat, 26 Nov 2011 21:54:32 +0000 (21:54 +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 22ace0bf2f9239278bba364f21627a622a6dc80b..41127e80cc1e961369679e91dd8c1e87196baf98 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 909489f4d23eb257de4450369d282d5217d3e446..37ef18de61b7742bec93d8a4c4008e16cda5d7fd 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 8c8300951f46d954bc732f10cd8635d975b14453..d75dcfa0f01c51bc05f11331d14ad28ba7a32118 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 4b79a80d5e1f67154adc0544e484726e0d5f3686..a104d5a80e111fec985bc207f5c6419f3e0ef4ee 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 343f60e9639fe54a9f3cf59978ceb17730d6fcb6..91b0f47885977e80ba5109f6b4205ce4b30de3b8 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 70a4e9265f06dc636a326e7628291078448c109a..355e962137c7cbee346142f7a66756c063bd4f19 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 a1d6e46ab0355fd5e6410ff4449bbcca28427d81..6677677351449813ddf057c93f93c8cc4d5cdb4d 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 d3cd3f63258a63dbd2e7354a239f188ee8f3de37..47587b83284299ae562ba20a5ff422c9668e5b86 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 9503fff404e3c5078527ec000bcb1a7287538142..527213169db07348d57c27e336b984db53e5ec35 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 ed6d772f4a24a233e17a70b705b989c4fd4fcec5..9a8697b97dd7d75d023fafe413beb270d97f0dca 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 743f7f1db181a43b7d40d89c139125335009931f..09c73659f467021631a3f769a58d5c2c9401d9e9 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 6020e26b1c7164700081ecc81ff8bedadf15a884..65faaa34de61382c6f74e2a90f0070f69c2adf58 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 201ae3676289f53fed5acbdaedba1a9b6f08ca5a..c87fde4deecad440b12482e9789eeea11ea08915 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 6197c79a2ecb7a38260eb6e437cab38f49e6aafb..0180c393c711a6267e75b59933a982605db9464b 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 ebd6767d8e88d5e3d467198b599756776f282335..292038fc59fdd70f8b0db81c9f95a2d52cd0e116 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 05db2d336b0891655a04e5e430a8fd8c3dc25130..c44eabaabc1650d487f0a066a5ac1cdffebd23ab 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 e47fa0578ae3f8e4f25782cd07ff067835481adf..96438b6b2022294297f8fc23390546f877f2b139 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 64317251ec008c93d2890ec3c38e2a3c33a66a3e..2c5fab00d205c9414ba44483b9f896c9864e1509 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 29f1526f7b70671129cebe330ab8c8b7656cb764..632a861ef82bcf9e85336e87fafb27a0f68aba3a 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 31e51f9b4b6402b3c5131168719cd0aed6c9d4ac..62c156b20ccd173fa204a301b87685f6a90b4e19 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 0fbcc14e09d7d7c55bb397721c4c84d9eff90d70..4e6ff759cd3293df880f5fc1d2f2fbaf422e067c 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 b35e2005a348e6fbc4c960d83e0d2d0d75cf889f..c96f37472edac0db7932d466935a4ba0f3d2b28d 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 b8be7d8d0cf406a6690412b45074fc2fedd4c84f..078c03f7cd52a2d6c13413aae2490aae0377dc09 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 faf81a0393600a7742ac645edd29570ec0c06600..46a9778171ce8b9da2ee0eafaad67f467d1f21f7 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