aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/alchemy/devboards/pb1000/board_setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/alchemy/devboards/pb1000/board_setup.c')
-rw-r--r--arch/mips/alchemy/devboards/pb1000/board_setup.c16
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 @@
27#include <linux/gpio.h> 27#include <linux/gpio.h>
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/interrupt.h> 29#include <linux/interrupt.h>
30#include <linux/pm.h>
30#include <asm/mach-au1x00/au1000.h> 31#include <asm/mach-au1x00/au1000.h>
31#include <asm/mach-pb1x00/pb1000.h> 32#include <asm/mach-pb1x00/pb1000.h>
33#include <asm/reboot.h>
32#include <prom.h> 34#include <prom.h>
33 35
34#include "../platform.h" 36#include "../platform.h"
@@ -38,8 +40,16 @@ const char *get_system_type(void)
38 return "Alchemy Pb1000"; 40 return "Alchemy Pb1000";
39} 41}
40 42
41void board_reset(void) 43static void board_reset(char *c)
42{ 44{
45 asm volatile ("jr %0" : : "r" (0xbfc00000));
46}
47
48static void board_power_off(void)
49{
50 printk(KERN_ALERT "It's now safe to remove power\n");
51 while (1)
52 asm volatile (".set mips3 ; wait ; .set mips1");
43} 53}
44 54
45void __init board_setup(void) 55void __init board_setup(void)
@@ -177,6 +187,10 @@ void __init board_setup(void)
177 au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL); 187 au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL);
178 break; 188 break;
179 } 189 }
190
191 pm_power_off = board_power_off;
192 _machine_halt = board_power_off;
193 _machine_restart = board_reset;
180} 194}
181 195
182static int __init pb1000_init_irq(void) 196static int __init pb1000_init_irq(void)