File: /usr/src/linux/arch/mips/baget/reset.c
1 #include <linux/kernel.h>
2 #include <asm/system.h>
3 #include <asm/baget/baget.h>
4
5
6 #define R3000_RESET_VEC 0xbfc00000
7 typedef void vector(void);
8
9
10 static void baget_reboot(char *from_fun)
11 {
12 cli();
13 baget_printk("\n%s: jumping to RESET code...\n", from_fun);
14 (*(vector*)R3000_RESET_VEC)();
15 }
16
17 /* fixme: proper functionality */
18
19 void baget_machine_restart(char *command)
20 {
21 baget_reboot("restart");
22 }
23
24 void baget_machine_halt(void)
25 {
26 baget_reboot("halt");
27 }
28
29 void baget_machine_power_off(void)
30 {
31 baget_reboot("power off");
32 }
33