summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-bcmring/arch.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-11-11 16:43:45 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-01-05 12:57:08 +0000
commitd1fce9c115eeb93e01c01732dfe9a86cf76009cf (patch)
tree40df9f4216dd37d7b036c66a7b141f4718e575a6 /arch/arm/mach-bcmring/arch.c
parent1b2073e7789429e6554e69b307d857d8f46a2e22 (diff)
downloadop-kernel-dev-d1fce9c115eeb93e01c01732dfe9a86cf76009cf.zip
op-kernel-dev-d1fce9c115eeb93e01c01732dfe9a86cf76009cf.tar.gz
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>
Diffstat (limited to 'arch/arm/mach-bcmring/arch.c')
-rw-r--r--arch/arm/mach-bcmring/arch.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/arch/arm/mach-bcmring/arch.c b/arch/arm/mach-bcmring/arch.c
index 31a1435..9e5e755 100644
--- a/arch/arm/mach-bcmring/arch.c
+++ b/arch/arm/mach-bcmring/arch.c
@@ -49,7 +49,29 @@ HW_DECLARE_SPINLOCK(gpio)
#endif
/* 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;
@@ -173,4 +195,5 @@ MACHINE_START(BCMRING, "BCMRING")
.init_irq = bcmring_init_irq,
.timer = &bcmring_timer,
.init_machine = bcmring_init_machine
+ .restart = bcmring_restart,
MACHINE_END
OpenPOWER on IntegriCloud