diff options
author | Manuel Lauss <manuel.lauss@googlemail.com> | 2009-12-08 19:18:13 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-02-27 12:53:04 +0100 |
commit | 32fd6901a6d8d19f94e4de6be4e4b552ab078620 (patch) | |
tree | b0bce261bcdbf6cd4b4026711ee5cbc6e10d9892 /arch/mips/alchemy/xxs1500 | |
parent | 325f8a0a31df567dbafafc48f8e60f3c1f101a46 (diff) | |
download | kernel_samsung_smdk4412-32fd6901a6d8d19f94e4de6be4e4b552ab078620.tar.gz kernel_samsung_smdk4412-32fd6901a6d8d19f94e4de6be4e4b552ab078620.tar.bz2 kernel_samsung_smdk4412-32fd6901a6d8d19f94e4de6be4e4b552ab078620.zip |
MIPS: Alchemy: get rid of common/reset.c
Implement reset / poweroff in the board code instead. The peripheral reset
code is gone too since YAMON which all in-tree boards use does the same
work when it boots.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/783/
Patchwork: http://patchwork.linux-mips.org/patch/882/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/alchemy/xxs1500')
-rw-r--r-- | arch/mips/alchemy/xxs1500/board_setup.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/mips/alchemy/xxs1500/board_setup.c b/arch/mips/alchemy/xxs1500/board_setup.c index 21bef8dc088..7956afa78c4 100644 --- a/arch/mips/alchemy/xxs1500/board_setup.c +++ b/arch/mips/alchemy/xxs1500/board_setup.c @@ -27,17 +27,26 @@ #include <linux/init.h> #include <linux/interrupt.h> #include <linux/delay.h> +#include <linux/pm.h> +#include <asm/reboot.h> #include <asm/mach-au1x00/au1000.h> #include <prom.h> -void board_reset(void) +static void xxs1500_reset(char *c) { /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */ au_writel(0x00000000, 0xAE00001C); } +static void xxs1500_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) { u32 pin_func; @@ -52,6 +61,10 @@ void __init board_setup(void) } #endif + pm_power_off = xxs1500_power_off; + _machine_halt = xxs1500_power_off; + _machine_restart = xxs1500_reset; + alchemy_gpio1_input_enable(); alchemy_gpio2_enable(); |