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/galileo-boards/ev96100/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/galileo-boards/ev96100/reset.c')
-rw-r--r-- | arch/mips/galileo-boards/ev96100/reset.c | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/arch/mips/galileo-boards/ev96100/reset.c b/arch/mips/galileo-boards/ev96100/reset.c new file mode 100644 index 000000000000..5ef9b7f896e6 --- /dev/null +++ b/arch/mips/galileo-boards/ev96100/reset.c | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
2 | * BRIEF MODULE DESCRIPTION | ||
3 | * Galileo EV96100 reset routines. | ||
4 | * | ||
5 | * Copyright 2000 MontaVista Software Inc. | ||
6 | * Author: MontaVista Software, Inc. | ||
7 | * ppopov@mvista.com or source@mvista.com | ||
8 | * | ||
9 | * This file was derived from Carsten Langgaard's | ||
10 | * arch/mips/mips-boards/generic/reset.c | ||
11 | * | ||
12 | * Carsten Langgaard, carstenl@mips.com | ||
13 | * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved. | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify it | ||
16 | * under the terms of the GNU General Public License as published by the | ||
17 | * Free Software Foundation; either version 2 of the License, or (at your | ||
18 | * option) any later version. | ||
19 | * | ||
20 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
21 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
22 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
23 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
24 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
25 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
26 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
27 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
29 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
30 | * | ||
31 | * You should have received a copy of the GNU General Public License along | ||
32 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
33 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
34 | */ | ||
35 | #include <linux/sched.h> | ||
36 | #include <linux/mm.h> | ||
37 | #include <asm/io.h> | ||
38 | #include <asm/pgtable.h> | ||
39 | #include <asm/processor.h> | ||
40 | #include <asm/reboot.h> | ||
41 | #include <asm/system.h> | ||
42 | #include <asm/gt64120.h> | ||
43 | |||
44 | static void mips_machine_restart(char *command); | ||
45 | static void mips_machine_halt(void); | ||
46 | |||
47 | static void mips_machine_restart(char *command) | ||
48 | { | ||
49 | set_c0_status(ST0_BEV | ST0_ERL); | ||
50 | change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED); | ||
51 | flush_cache_all(); | ||
52 | write_c0_wired(0); | ||
53 | __asm__ __volatile__("jr\t%0"::"r"(0xbfc00000)); | ||
54 | while (1); | ||
55 | } | ||
56 | |||
57 | static void mips_machine_halt(void) | ||
58 | { | ||
59 | printk(KERN_NOTICE "You can safely turn off the power\n"); | ||
60 | while (1) | ||
61 | __asm__(".set\tmips3\n\t" | ||
62 | "wait\n\t" | ||
63 | ".set\tmips0"); | ||
64 | } | ||
65 | |||
66 | void mips_reboot_setup(void) | ||
67 | { | ||
68 | _machine_restart = mips_machine_restart; | ||
69 | _machine_halt = mips_machine_halt; | ||
70 | } | ||