aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/alchemy/xxs1500
diff options
context:
space:
mode:
authorManuel Lauss <manuel.lauss@googlemail.com>2009-12-08 13:18:13 -0500
committerRalf Baechle <ralf@linux-mips.org>2010-02-27 06:53:04 -0500
commit32fd6901a6d8d19f94e4de6be4e4b552ab078620 (patch)
treeb0bce261bcdbf6cd4b4026711ee5cbc6e10d9892 /arch/mips/alchemy/xxs1500
parent325f8a0a31df567dbafafc48f8e60f3c1f101a46 (diff)
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.c15
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 21bef8dc0883..7956afa78c4b 100644
--- a/arch/mips/alchemy/xxs1500/board_setup.c
+++ b/arch/mips/alchemy/xxs1500/board_setup.c
@@ -27,17 +27,26 @@
27#include <linux/init.h> 27#include <linux/init.h>
28#include <linux/interrupt.h> 28#include <linux/interrupt.h>
29#include <linux/delay.h> 29#include <linux/delay.h>
30#include <linux/pm.h>
30 31
32#include <asm/reboot.h>
31#include <asm/mach-au1x00/au1000.h> 33#include <asm/mach-au1x00/au1000.h>
32 34
33#include <prom.h> 35#include <prom.h>
34 36
35void board_reset(void) 37static void xxs1500_reset(char *c)
36{ 38{
37 /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */ 39 /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */
38 au_writel(0x00000000, 0xAE00001C); 40 au_writel(0x00000000, 0xAE00001C);
39} 41}
40 42
43static void xxs1500_power_off(void)
44{
45 printk(KERN_ALERT "It's now safe to remove power\n");
46 while (1)
47 asm volatile (".set mips3 ; wait ; .set mips1");
48}
49
41void __init board_setup(void) 50void __init board_setup(void)
42{ 51{
43 u32 pin_func; 52 u32 pin_func;
@@ -52,6 +61,10 @@ void __init board_setup(void)
52 } 61 }
53#endif 62#endif
54 63
64 pm_power_off = xxs1500_power_off;
65 _machine_halt = xxs1500_power_off;
66 _machine_restart = xxs1500_reset;
67
55 alchemy_gpio1_input_enable(); 68 alchemy_gpio1_input_enable();
56 alchemy_gpio2_enable(); 69 alchemy_gpio2_enable();
57 70