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>
12 #include <asm/mips-boards/generic.h>
14 static void mips_machine_restart(char *command
)
16 unsigned int __iomem
*softres_reg
=
17 ioremap(SOFTRES_REG
, sizeof(unsigned int));
19 __raw_writel(GORESET
, softres_reg
);
22 static void mips_machine_halt(void)
24 unsigned int __iomem
*softres_reg
=
25 ioremap(SOFTRES_REG
, sizeof(unsigned int));
27 __raw_writel(GORESET
, softres_reg
);
30 static int __init
mips_reboot_setup(void)
32 _machine_restart
= mips_machine_restart
;
33 _machine_halt
= mips_machine_halt
;
34 pm_power_off
= mips_machine_halt
;
39 arch_initcall(mips_reboot_setup
);