diff options
Diffstat (limited to 'arch/mips/mti-sead3/sead3-reset.c')
-rw-r--r-- | arch/mips/mti-sead3/sead3-reset.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/mips/mti-sead3/sead3-reset.c b/arch/mips/mti-sead3/sead3-reset.c new file mode 100644 index 000000000000..20475c5e7b9c --- /dev/null +++ b/arch/mips/mti-sead3/sead3-reset.c | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. | ||
7 | */ | ||
8 | #include <linux/io.h> | ||
9 | #include <linux/pm.h> | ||
10 | |||
11 | #include <asm/reboot.h> | ||
12 | #include <asm/mips-boards/generic.h> | ||
13 | |||
14 | static void mips_machine_restart(char *command) | ||
15 | { | ||
16 | unsigned int __iomem *softres_reg = | ||
17 | ioremap(SOFTRES_REG, sizeof(unsigned int)); | ||
18 | |||
19 | __raw_writel(GORESET, softres_reg); | ||
20 | } | ||
21 | |||
22 | static void mips_machine_halt(void) | ||
23 | { | ||
24 | unsigned int __iomem *softres_reg = | ||
25 | ioremap(SOFTRES_REG, sizeof(unsigned int)); | ||
26 | |||
27 | __raw_writel(GORESET, softres_reg); | ||
28 | } | ||
29 | |||
30 | static int __init mips_reboot_setup(void) | ||
31 | { | ||
32 | _machine_restart = mips_machine_restart; | ||
33 | _machine_halt = mips_machine_halt; | ||
34 | pm_power_off = mips_machine_halt; | ||
35 | |||
36 | return 0; | ||
37 | } | ||
38 | |||
39 | arch_initcall(mips_reboot_setup); | ||