diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-11 22:21:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-11 22:21:23 -0400 |
commit | dd6d1844af33acb4edd0a40b1770d091a22c94be (patch) | |
tree | e6bd3549919773a13b770324a4dddb51b194b452 /arch/mips/lasat/reset.c | |
parent | 19f71153b9be219756c6b2757921433a69b7975c (diff) | |
parent | aaf76a3245c02faba51c96b9a340c14d6bb0dcc0 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (80 commits)
[MIPS] tlbex.c: Cleanup __init usage.
[MIPS] WRPPMC serial support move to platform device
[MIPS] R1: Fix hazard barriers to make kernels work on R2 also.
[MIPS] VPE: reimplement ELF loader.
[MIPS] cleanup WRPPMC include files
[MIPS] Add BUG_ON assertion for attempt to run kernel on the wrong CPU type.
[MIPS] SMP: Use ISO C struct initializer for local structs.
[MIPS] SMP: Kill useless casts.
[MIPS] Kill num_online_cpus() loops.
[MIPS] SMP: Implement smp_call_function_mask().
[MIPS] Make facility to convert CPU types to strings generally available.
[MIPS] Convert list of CPU types from #define to enum.
[MIPS] Optimize get_unaligned / put_unaligned implementations.
[MIPS] checkfiles: Fix "need space after that ','" errors.
[MIPS] Fix "no space between function name and open parenthesis" warnings.
[MIPS] Allow hardwiring of the CPU type to a single type for optimization.
[MIPS] tlbex: Size optimize code by declaring a few functions inline.
[MIPS] pg-r4k.c: Dump the generated code
[MIPS] Cobalt: Remove cobalt_machine_power_off()
[MIPS] Cobalt: Move reset port definition to arch/mips/cobalt/reset.c
...
Diffstat (limited to 'arch/mips/lasat/reset.c')
-rw-r--r-- | arch/mips/lasat/reset.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/arch/mips/lasat/reset.c b/arch/mips/lasat/reset.c new file mode 100644 index 000000000000..b1e7a89fb730 --- /dev/null +++ b/arch/mips/lasat/reset.c | |||
@@ -0,0 +1,61 @@ | |||
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/kernel.h> | ||
21 | #include <linux/pm.h> | ||
22 | |||
23 | #include <asm/reboot.h> | ||
24 | #include <asm/system.h> | ||
25 | #include <asm/lasat/lasat.h> | ||
26 | |||
27 | #include "picvue.h" | ||
28 | #include "prom.h" | ||
29 | |||
30 | static void lasat_machine_restart(char *command); | ||
31 | static void lasat_machine_halt(void); | ||
32 | |||
33 | /* Used to set machine to boot in service mode via /proc interface */ | ||
34 | int lasat_boot_to_service; | ||
35 | |||
36 | static void lasat_machine_restart(char *command) | ||
37 | { | ||
38 | local_irq_disable(); | ||
39 | |||
40 | if (lasat_boot_to_service) { | ||
41 | *(volatile unsigned int *)0xa0000024 = 0xdeadbeef; | ||
42 | *(volatile unsigned int *)0xa00000fc = 0xfedeabba; | ||
43 | } | ||
44 | *lasat_misc->reset_reg = 0xbedead; | ||
45 | for (;;) ; | ||
46 | } | ||
47 | |||
48 | static void lasat_machine_halt(void) | ||
49 | { | ||
50 | local_irq_disable(); | ||
51 | |||
52 | prom_monitor(); | ||
53 | for (;;) ; | ||
54 | } | ||
55 | |||
56 | void lasat_reboot_setup(void) | ||
57 | { | ||
58 | _machine_restart = lasat_machine_restart; | ||
59 | _machine_halt = lasat_machine_halt; | ||
60 | pm_power_off = lasat_machine_halt; | ||
61 | } | ||