From 957843bfa2d2dff98da6efd23c3a454d7c9d7b8e Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 11 Nov 2011 16:43:45 +0000 Subject: [PATCH] --- yaml --- r: 279947 b: refs/heads/master c: d1fce9c115eeb93e01c01732dfe9a86cf76009cf h: refs/heads/master i: 279945: 36e2bcf4d70f17257c9a75af70b11c01a96a00bb 279943: 739bedb48daaf303f1cfd175437adb12d8c33a8a v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-bcmring/arch.c | 25 ++++++++++++++++++- .../arm/mach-bcmring/include/mach/system.h | 22 ---------------- 3 files changed, 25 insertions(+), 24 deletions(-) diff --git a/[refs] b/[refs] index ccf9883cd2ab..edc6aed69bb2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1b2073e7789429e6554e69b307d857d8f46a2e22 +refs/heads/master: d1fce9c115eeb93e01c01732dfe9a86cf76009cf diff --git a/trunk/arch/arm/mach-bcmring/arch.c b/trunk/arch/arm/mach-bcmring/arch.c index 31a143592c81..9e5e7552498c 100644 --- a/trunk/arch/arm/mach-bcmring/arch.c +++ b/trunk/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 diff --git a/trunk/arch/arm/mach-bcmring/include/mach/system.h b/trunk/arch/arm/mach-bcmring/include/mach/system.h index 38b37060d426..ca0fbf563d86 100644 --- a/trunk/arch/arm/mach-bcmring/include/mach/system.h +++ b/trunk/arch/arm/mach-bcmring/include/mach/system.h @@ -20,10 +20,6 @@ #ifndef __ASM_ARCH_SYSTEM_H #define __ASM_ARCH_SYSTEM_H -#include - -extern int bcmring_arch_warm_reboot; - static inline void arch_idle(void) { cpu_do_idle(); @@ -31,24 +27,6 @@ static inline void arch_idle(void) 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