3 * Carsten Langgaard, carstenl@mips.com
4 * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
6 * ########################################################################
8 * This program is free software; you can distribute it and/or modify it
9 * under the terms of the GNU General Public License (Version 2) as
10 * published by the Free Software Foundation.
12 * This program is distributed in the hope it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
21 * ########################################################################
23 * Reset the MIPS boards.
26 #include <linux/init.h>
30 #include <asm/reboot.h>
32 #define SOFTRES_REG 0x1F000050
35 static void mips_machine_restart(char *command
);
36 static void mips_machine_halt(void);
38 static void mips_machine_restart(char *command
)
40 unsigned int __iomem
*softres_reg
=
41 ioremap(SOFTRES_REG
, sizeof(unsigned int));
43 __raw_writel(GORESET
, softres_reg
);
46 static void mips_machine_halt(void)
48 unsigned int __iomem
*softres_reg
=
49 ioremap(SOFTRES_REG
, sizeof(unsigned int));
51 __raw_writel(GORESET
, softres_reg
);
55 static int __init
mips_reboot_setup(void)
57 _machine_restart
= mips_machine_restart
;
58 _machine_halt
= mips_machine_halt
;
59 pm_power_off
= mips_machine_halt
;
64 arch_initcall(mips_reboot_setup
);