Selaa lähdekoodia

ARM: restart: bcmring: use new restart hook

Hook the Shark restart code into the new restart hook rather than
using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King 13 vuotta sitten
vanhempi
commit
d1fce9c115
2 muutettua tiedostoa jossa 24 lisäystä ja 23 poistoa
  1. 24 1
      arch/arm/mach-bcmring/arch.c
  2. 0 22
      arch/arm/mach-bcmring/include/mach/system.h

+ 24 - 1
arch/arm/mach-bcmring/arch.c

@@ -49,7 +49,29 @@ HW_DECLARE_SPINLOCK(gpio)
 #endif
 #endif
 
 
 /* sysctl */
 /* sysctl */
-int bcmring_arch_warm_reboot;	/* do a warm reboot on hard reset */
+static int bcmring_arch_warm_reboot;	/* do a warm reboot on hard reset */
+
+static void bcmring_restart(char mode, const char *cmd)
+{
+	printk("arch_reset:%c %x\n", mode, bcmring_arch_warm_reboot);
+
+	if (mode == 'h') {
+		/* Reboot configured in proc entry */
+		if (bcmring_arch_warm_reboot) {
+			printk("warm reset\n");
+			/* Issue Warm reset (do not reset ethernet switch, keep alive) */
+			chipcHw_reset(chipcHw_REG_SOFT_RESET_CHIP_WARM);
+		} else {
+			/* Force reset of everything */
+			printk("force reset\n");
+			chipcHw_reset(chipcHw_REG_SOFT_RESET_CHIP_SOFT);
+		}
+	} else {
+		/* Force reset of everything */
+		printk("force reset\n");
+		chipcHw_reset(chipcHw_REG_SOFT_RESET_CHIP_SOFT);
+	}
+}
 
 
 static struct ctl_table_header *bcmring_sysctl_header;
 static struct ctl_table_header *bcmring_sysctl_header;
 
 
@@ -173,4 +195,5 @@ MACHINE_START(BCMRING, "BCMRING")
 	.init_irq = bcmring_init_irq,
 	.init_irq = bcmring_init_irq,
 	.timer = &bcmring_timer,
 	.timer = &bcmring_timer,
 	.init_machine = bcmring_init_machine
 	.init_machine = bcmring_init_machine
+	.restart = bcmring_restart,
 MACHINE_END
 MACHINE_END

+ 0 - 22
arch/arm/mach-bcmring/include/mach/system.h

@@ -20,10 +20,6 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
 
-#include <mach/csp/chipcHw_inline.h>
-
-extern int bcmring_arch_warm_reboot;
-
 static inline void arch_idle(void)
 static inline void arch_idle(void)
 {
 {
 	cpu_do_idle();
 	cpu_do_idle();
@@ -31,24 +27,6 @@ static inline void arch_idle(void)
 
 
 static inline void arch_reset(char mode, const char *cmd)
 static inline void arch_reset(char mode, const char *cmd)
 {
 {
-	printk("arch_reset:%c %x\n", mode, bcmring_arch_warm_reboot);
-
-	if (mode == 'h') {
-		/* Reboot configured in proc entry */
-		if (bcmring_arch_warm_reboot) {
-			printk("warm reset\n");
-			/* Issue Warm reset (do not reset ethernet switch, keep alive) */
-			chipcHw_reset(chipcHw_REG_SOFT_RESET_CHIP_WARM);
-		} else {
-			/* Force reset of everything */
-			printk("force reset\n");
-			chipcHw_reset(chipcHw_REG_SOFT_RESET_CHIP_SOFT);
-		}
-	} else {
-		/* Force reset of everything */
-		printk("force reset\n");
-		chipcHw_reset(chipcHw_REG_SOFT_RESET_CHIP_SOFT);
-	}
 }
 }
 
 
 #endif
 #endif