diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2008-07-23 11:25:17 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-07-30 16:54:38 -0400 |
commit | a49297e8fc8a9a835ac4ec124aa83028abdcc7d5 (patch) | |
tree | 04b9c04589033206888789122d436e287953480c /arch/mips/txx9/rbtx4927 | |
parent | 455cc256eb23915100e203fb33ee143afd127954 (diff) |
[MIPS] TXx9: Cleanup restart/halt/power_off
Unify machine_restart/machine_halt/pm_power_off and add fallback
machine_halt routine.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/txx9/rbtx4927')
-rw-r--r-- | arch/mips/txx9/rbtx4927/setup.c | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/arch/mips/txx9/rbtx4927/setup.c b/arch/mips/txx9/rbtx4927/setup.c index 65b72247d320..54c33c3e9f7d 100644 --- a/arch/mips/txx9/rbtx4927/setup.c +++ b/arch/mips/txx9/rbtx4927/setup.c | |||
@@ -47,11 +47,9 @@ | |||
47 | #include <linux/types.h> | 47 | #include <linux/types.h> |
48 | #include <linux/ioport.h> | 48 | #include <linux/ioport.h> |
49 | #include <linux/interrupt.h> | 49 | #include <linux/interrupt.h> |
50 | #include <linux/pm.h> | ||
51 | #include <linux/platform_device.h> | 50 | #include <linux/platform_device.h> |
52 | #include <linux/delay.h> | 51 | #include <linux/delay.h> |
53 | #include <asm/io.h> | 52 | #include <asm/io.h> |
54 | #include <asm/processor.h> | ||
55 | #include <asm/reboot.h> | 53 | #include <asm/reboot.h> |
56 | #include <asm/txx9/generic.h> | 54 | #include <asm/txx9/generic.h> |
57 | #include <asm/txx9/pci.h> | 55 | #include <asm/txx9/pci.h> |
@@ -167,17 +165,8 @@ static void __init rbtx4937_arch_init(void) | |||
167 | #define rbtx4937_arch_init NULL | 165 | #define rbtx4937_arch_init NULL |
168 | #endif /* CONFIG_PCI */ | 166 | #endif /* CONFIG_PCI */ |
169 | 167 | ||
170 | static void __noreturn wait_forever(void) | ||
171 | { | ||
172 | while (1) | ||
173 | if (cpu_wait) | ||
174 | (*cpu_wait)(); | ||
175 | } | ||
176 | |||
177 | static void toshiba_rbtx4927_restart(char *command) | 168 | static void toshiba_rbtx4927_restart(char *command) |
178 | { | 169 | { |
179 | printk(KERN_NOTICE "System Rebooting...\n"); | ||
180 | |||
181 | /* enable the s/w reset register */ | 170 | /* enable the s/w reset register */ |
182 | writeb(1, rbtx4927_softresetlock_addr); | 171 | writeb(1, rbtx4927_softresetlock_addr); |
183 | 172 | ||
@@ -188,24 +177,8 @@ static void toshiba_rbtx4927_restart(char *command) | |||
188 | /* do a s/w reset */ | 177 | /* do a s/w reset */ |
189 | writeb(1, rbtx4927_softreset_addr); | 178 | writeb(1, rbtx4927_softreset_addr); |
190 | 179 | ||
191 | /* do something passive while waiting for reset */ | 180 | /* fallback */ |
192 | local_irq_disable(); | 181 | (*_machine_halt)(); |
193 | wait_forever(); | ||
194 | /* no return */ | ||
195 | } | ||
196 | |||
197 | static void toshiba_rbtx4927_halt(void) | ||
198 | { | ||
199 | printk(KERN_NOTICE "System Halted\n"); | ||
200 | local_irq_disable(); | ||
201 | wait_forever(); | ||
202 | /* no return */ | ||
203 | } | ||
204 | |||
205 | static void toshiba_rbtx4927_power_off(void) | ||
206 | { | ||
207 | toshiba_rbtx4927_halt(); | ||
208 | /* no return */ | ||
209 | } | 182 | } |
210 | 183 | ||
211 | static void __init rbtx4927_clock_init(void); | 184 | static void __init rbtx4927_clock_init(void); |
@@ -233,8 +206,6 @@ static void __init rbtx4927_mem_setup(void) | |||
233 | } | 206 | } |
234 | 207 | ||
235 | _machine_restart = toshiba_rbtx4927_restart; | 208 | _machine_restart = toshiba_rbtx4927_restart; |
236 | _machine_halt = toshiba_rbtx4927_halt; | ||
237 | pm_power_off = toshiba_rbtx4927_power_off; | ||
238 | 209 | ||
239 | #ifdef CONFIG_PCI | 210 | #ifdef CONFIG_PCI |
240 | txx9_alloc_pci_controller(&txx9_primary_pcic, | 211 | txx9_alloc_pci_controller(&txx9_primary_pcic, |