aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-bcmring/arch.c
diff options
context:
space:
mode:
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 31a143592c81..9e5e7552498c 100644
--- a/arch/arm/mach-bcmring/arch.c
+++ b/arch/arm/mach-bcmring/arch.c
@@ -49,7 +49,29 @@ HW_DECLARE_SPINLOCK(gpio)
49#endif 49#endif
50 50
51/* sysctl */ 51/* sysctl */
52int bcmring_arch_warm_reboot; /* do a warm reboot on hard reset */ 52static int bcmring_arch_warm_reboot; /* do a warm reboot on hard reset */
53
54static void bcmring_restart(char mode, const char *cmd)
55{
56 printk("arch_reset:%c %x\n", mode, bcmring_arch_warm_reboot);
57
58 if (mode == 'h') {
59 /* Reboot configured in proc entry */
60 if (bcmring_arch_warm_reboot) {
61 printk("warm reset\n");
62 /* Issue Warm reset (do not reset ethernet switch, keep alive) */
63 chipcHw_reset(chipcHw_REG_SOFT_RESET_CHIP_WARM);
64 } else {
65 /* Force reset of everything */
66 printk("force reset\n");
67 chipcHw_reset(chipcHw_REG_SOFT_RESET_CHIP_SOFT);
68 }
69 } else {
70 /* Force reset of everything */
71 printk("force reset\n");
72 chipcHw_reset(chipcHw_REG_SOFT_RESET_CHIP_SOFT);
73 }
74}
53 75
54static struct ctl_table_header *bcmring_sysctl_header; 76static struct ctl_table_header *bcmring_sysctl_header;
55 77
@@ -173,4 +195,5 @@ MACHINE_START(BCMRING, "BCMRING")
173 .init_irq = bcmring_init_irq, 195 .init_irq = bcmring_init_irq,
174 .timer = &bcmring_timer, 196 .timer = &bcmring_timer,
175 .init_machine = bcmring_init_machine 197 .init_machine = bcmring_init_machine
198 .restart = bcmring_restart,
176MACHINE_END 199MACHINE_END