From a49297e8fc8a9a835ac4ec124aa83028abdcc7d5 Mon Sep 17 00:00:00 2001 From: Atsushi Nemoto Date: Thu, 24 Jul 2008 00:25:17 +0900 Subject: [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 Signed-off-by: Ralf Baechle --- arch/mips/txx9/rbtx4927/setup.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) (limited to 'arch/mips/txx9/rbtx4927/setup.c') 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 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -167,17 +165,8 @@ static void __init rbtx4937_arch_init(void) #define rbtx4937_arch_init NULL #endif /* CONFIG_PCI */ -static void __noreturn wait_forever(void) -{ - while (1) - if (cpu_wait) - (*cpu_wait)(); -} - static void toshiba_rbtx4927_restart(char *command) { - printk(KERN_NOTICE "System Rebooting...\n"); - /* enable the s/w reset register */ writeb(1, rbtx4927_softresetlock_addr); @@ -188,24 +177,8 @@ static void toshiba_rbtx4927_restart(char *command) /* do a s/w reset */ writeb(1, rbtx4927_softreset_addr); - /* do something passive while waiting for reset */ - local_irq_disable(); - wait_forever(); - /* no return */ -} - -static void toshiba_rbtx4927_halt(void) -{ - printk(KERN_NOTICE "System Halted\n"); - local_irq_disable(); - wait_forever(); - /* no return */ -} - -static void toshiba_rbtx4927_power_off(void) -{ - toshiba_rbtx4927_halt(); - /* no return */ + /* fallback */ + (*_machine_halt)(); } static void __init rbtx4927_clock_init(void); @@ -233,8 +206,6 @@ static void __init rbtx4927_mem_setup(void) } _machine_restart = toshiba_rbtx4927_restart; - _machine_halt = toshiba_rbtx4927_halt; - pm_power_off = toshiba_rbtx4927_power_off; #ifdef CONFIG_PCI txx9_alloc_pci_controller(&txx9_primary_pcic, -- cgit v1.2.3