diff options
author | Manuel Lauss <manuel.lauss@googlemail.com> | 2010-03-26 00:55:38 +0300 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-05-22 00:31:15 +0400 |
commit | 7b5fcd694dffd1db294dd4ef9f90911852e422f5 (patch) | |
tree | 12ed508995204ea32d86186f18816e3f0bacfd70 /arch/mips/alchemy/devboards/pb1000 | |
parent | b8853aa3d912f47f649ad8de784ac3afd932437d (diff) | |
download | linux-7b5fcd694dffd1db294dd4ef9f90911852e422f5.tar.xz |
MIPS: Alchemy: Fix up residual devboard poweroff/reboot code.
Clean out stray unused board_reset() calls in pb1x boards, the PB1000 is
different from the rest and gets private methods.
(Cleanup after 32fd6901a6d8d19f94e4de6be4e4b552ab078620)
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
To: Linux-MIPS <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/1085/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/alchemy/devboards/pb1000')
-rw-r--r-- | arch/mips/alchemy/devboards/pb1000/board_setup.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/mips/alchemy/devboards/pb1000/board_setup.c b/arch/mips/alchemy/devboards/pb1000/board_setup.c index b5311d8a29ab..4ef50d86b181 100644 --- a/arch/mips/alchemy/devboards/pb1000/board_setup.c +++ b/arch/mips/alchemy/devboards/pb1000/board_setup.c @@ -27,8 +27,10 @@ #include <linux/gpio.h> #include <linux/init.h> #include <linux/interrupt.h> +#include <linux/pm.h> #include <asm/mach-au1x00/au1000.h> #include <asm/mach-pb1x00/pb1000.h> +#include <asm/reboot.h> #include <prom.h> #include "../platform.h" @@ -38,8 +40,16 @@ const char *get_system_type(void) return "Alchemy Pb1000"; } -void board_reset(void) +static void board_reset(char *c) { + asm volatile ("jr %0" : : "r" (0xbfc00000)); +} + +static void board_power_off(void) +{ + printk(KERN_ALERT "It's now safe to remove power\n"); + while (1) + asm volatile (".set mips3 ; wait ; .set mips1"); } void __init board_setup(void) @@ -177,6 +187,10 @@ void __init board_setup(void) au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL); break; } + + pm_power_off = board_power_off; + _machine_halt = board_power_off; + _machine_restart = board_reset; } static int __init pb1000_init_irq(void) |