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
6 * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
11 #include <asm/reboot.h>
13 #define SOFTRES_REG 0x1f000050
16 static void mips_machine_restart(char *command)
18 unsigned int __iomem *softres_reg =
19 ioremap(SOFTRES_REG, sizeof(unsigned int));
21 __raw_writel(GORESET, softres_reg);
24 static void mips_machine_halt(void)
26 unsigned int __iomem *softres_reg =
27 ioremap(SOFTRES_REG, sizeof(unsigned int));
29 __raw_writel(GORESET, softres_reg);
32 static int __init mips_reboot_setup(void)
34 _machine_restart = mips_machine_restart;
35 _machine_halt = mips_machine_halt;
36 pm_power_off = mips_machine_halt;
40 arch_initcall(mips_reboot_setup);