patch-2.2.11 linux/arch/mips/baget/reset.c

Next file: linux/arch/mips/baget/setup.c
Previous file: linux/arch/mips/baget/prom/init.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.10/linux/arch/mips/baget/reset.c linux/arch/mips/baget/reset.c
@@ -0,0 +1,32 @@
+#include <linux/kernel.h>
+#include <asm/system.h>
+#include <asm/baget/baget.h>
+
+
+#define R3000_RESET_VEC  0xbfc00000
+typedef void vector(void);
+
+
+static void baget_reboot(char *from_fun)
+{
+	cli();
+	baget_printk("\n%s: jumping to RESET code...\n", from_fun);
+	(*(vector*)R3000_RESET_VEC)();
+}
+
+/* fixme: proper functionality */
+
+void baget_machine_restart(char *command)
+{
+	baget_reboot("restart");
+}
+
+void baget_machine_halt(void)
+{
+	baget_reboot("halt");
+}
+
+void baget_machine_power_off(void)
+{
+	baget_reboot("power off");
+}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)