diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2008-07-23 19:25:17 +0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-07-31 00:54:38 +0400 |
commit | a49297e8fc8a9a835ac4ec124aa83028abdcc7d5 (patch) | |
tree | 04b9c04589033206888789122d436e287953480c /arch/mips/txx9/rbtx4938 | |
parent | 455cc256eb23915100e203fb33ee143afd127954 (diff) | |
download | linux-a49297e8fc8a9a835ac4ec124aa83028abdcc7d5.tar.xz |
[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/rbtx4938')
-rw-r--r-- | arch/mips/txx9/rbtx4938/setup.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/arch/mips/txx9/rbtx4938/setup.c b/arch/mips/txx9/rbtx4938/setup.c index 4454b7901cd3..e1177b3b9103 100644 --- a/arch/mips/txx9/rbtx4938/setup.c +++ b/arch/mips/txx9/rbtx4938/setup.c @@ -15,7 +15,6 @@ #include <linux/delay.h> #include <linux/interrupt.h> #include <linux/console.h> -#include <linux/pm.h> #include <linux/platform_device.h> #include <linux/gpio.h> @@ -28,33 +27,14 @@ #include <asm/txx9/spi.h> #include <asm/txx9pio.h> -static void rbtx4938_machine_halt(void) -{ - printk(KERN_NOTICE "System Halted\n"); - local_irq_disable(); - - while (1) - __asm__(".set\tmips3\n\t" - "wait\n\t" - ".set\tmips0"); -} - -static void rbtx4938_machine_power_off(void) -{ - rbtx4938_machine_halt(); - /* no return */ -} - static void rbtx4938_machine_restart(char *command) { local_irq_disable(); - - printk("Rebooting..."); writeb(1, rbtx4938_softresetlock_addr); writeb(1, rbtx4938_sfvol_addr); writeb(1, rbtx4938_softreset_addr); - while(1) - ; + /* fallback */ + (*_machine_halt)(); } static void __init rbtx4938_pci_setup(void) @@ -263,8 +243,6 @@ static void __init rbtx4938_mem_setup(void) printk("request resource for fpga failed\n"); _machine_restart = rbtx4938_machine_restart; - _machine_halt = rbtx4938_machine_halt; - pm_power_off = rbtx4938_machine_power_off; writeb(0xff, rbtx4938_led_addr); printk(KERN_INFO "RBTX4938 --- FPGA(Rev %02x) DIPSW:%02x,%02x\n", |