diff options
Diffstat (limited to 'arch/arm/mach-bcmring')
-rw-r--r-- | arch/arm/mach-bcmring/arch.c | 25 | ||||
-rw-r--r-- | arch/arm/mach-bcmring/include/mach/system.h | 26 |
2 files changed, 24 insertions, 27 deletions
diff --git a/arch/arm/mach-bcmring/arch.c b/arch/arm/mach-bcmring/arch.c index 31a143592c8..9e5e7552498 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 */ |
52 | int bcmring_arch_warm_reboot; /* do a warm reboot on hard reset */ | 52 | static int bcmring_arch_warm_reboot; /* do a warm reboot on hard reset */ |
53 | |||
54 | static 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 | ||
54 | static struct ctl_table_header *bcmring_sysctl_header; | 76 | static 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, | ||
176 | MACHINE_END | 199 | MACHINE_END |
diff --git a/arch/arm/mach-bcmring/include/mach/system.h b/arch/arm/mach-bcmring/include/mach/system.h index 38b37060d42..cb78250db64 100644 --- a/arch/arm/mach-bcmring/include/mach/system.h +++ b/arch/arm/mach-bcmring/include/mach/system.h | |||
@@ -20,35 +20,9 @@ | |||
20 | #ifndef __ASM_ARCH_SYSTEM_H | 20 | #ifndef __ASM_ARCH_SYSTEM_H |
21 | #define __ASM_ARCH_SYSTEM_H | 21 | #define __ASM_ARCH_SYSTEM_H |
22 | 22 | ||
23 | #include <mach/csp/chipcHw_inline.h> | ||
24 | |||
25 | extern int bcmring_arch_warm_reboot; | ||
26 | |||
27 | static inline void arch_idle(void) | 23 | static inline void arch_idle(void) |
28 | { | 24 | { |
29 | cpu_do_idle(); | 25 | cpu_do_idle(); |
30 | } | 26 | } |
31 | 27 | ||
32 | static inline void arch_reset(char mode, const char *cmd) | ||
33 | { | ||
34 | printk("arch_reset:%c %x\n", mode, bcmring_arch_warm_reboot); | ||
35 | |||
36 | if (mode == 'h') { | ||
37 | /* Reboot configured in proc entry */ | ||
38 | if (bcmring_arch_warm_reboot) { | ||
39 | printk("warm reset\n"); | ||
40 | /* Issue Warm reset (do not reset ethernet switch, keep alive) */ | ||
41 | chipcHw_reset(chipcHw_REG_SOFT_RESET_CHIP_WARM); | ||
42 | } else { | ||
43 | /* Force reset of everything */ | ||
44 | printk("force reset\n"); | ||
45 | chipcHw_reset(chipcHw_REG_SOFT_RESET_CHIP_SOFT); | ||
46 | } | ||
47 | } else { | ||
48 | /* Force reset of everything */ | ||
49 | printk("force reset\n"); | ||
50 | chipcHw_reset(chipcHw_REG_SOFT_RESET_CHIP_SOFT); | ||
51 | } | ||
52 | } | ||
53 | |||
54 | #endif | 28 | #endif |