diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/mips/lasat/reset.c |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/mips/lasat/reset.c')
-rw-r--r-- | arch/mips/lasat/reset.c | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/arch/mips/lasat/reset.c b/arch/mips/lasat/reset.c new file mode 100644 index 000000000000..37e4912ee1c8 --- /dev/null +++ b/arch/mips/lasat/reset.c | |||
@@ -0,0 +1,67 @@ | |||
1 | /* | ||
2 | * Thomas Horsten <thh@lasat.com> | ||
3 | * Copyright (C) 2000 LASAT Networks A/S. | ||
4 | * | ||
5 | * This program is free software; you can distribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License (Version 2) as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
12 | * for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
17 | * | ||
18 | * Reset the LASAT board. | ||
19 | */ | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/kernel.h> | ||
22 | #include <asm/reboot.h> | ||
23 | #include <asm/system.h> | ||
24 | #include <asm/lasat/lasat.h> | ||
25 | #include "picvue.h" | ||
26 | #include "prom.h" | ||
27 | |||
28 | static void lasat_machine_restart(char *command); | ||
29 | static void lasat_machine_halt(void); | ||
30 | |||
31 | /* Used to set machine to boot in service mode via /proc interface */ | ||
32 | int lasat_boot_to_service = 0; | ||
33 | |||
34 | static void lasat_machine_restart(char *command) | ||
35 | { | ||
36 | local_irq_disable(); | ||
37 | |||
38 | if (lasat_boot_to_service) { | ||
39 | printk("machine_restart: Rebooting to service mode\n"); | ||
40 | *(volatile unsigned int *)0xa0000024 = 0xdeadbeef; | ||
41 | *(volatile unsigned int *)0xa00000fc = 0xfedeabba; | ||
42 | } | ||
43 | *lasat_misc->reset_reg = 0xbedead; | ||
44 | for (;;) ; | ||
45 | } | ||
46 | |||
47 | #define MESSAGE "System halted" | ||
48 | static void lasat_machine_halt(void) | ||
49 | { | ||
50 | local_irq_disable(); | ||
51 | |||
52 | /* Disable interrupts and loop forever */ | ||
53 | printk(KERN_NOTICE MESSAGE "\n"); | ||
54 | #ifdef CONFIG_PICVUE | ||
55 | pvc_clear(); | ||
56 | pvc_write_string(MESSAGE, 0, 0); | ||
57 | #endif | ||
58 | prom_monitor(); | ||
59 | for (;;) ; | ||
60 | } | ||
61 | |||
62 | void lasat_reboot_setup(void) | ||
63 | { | ||
64 | _machine_restart = lasat_machine_restart; | ||
65 | _machine_halt = lasat_machine_halt; | ||
66 | _machine_power_off = lasat_machine_halt; | ||
67 | } | ||