Path: blob/master/arch/mips/mti-malta/malta-reset.c
10818 views
/*1* Carsten Langgaard, [email protected]2* Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.3*4* ########################################################################5*6* This program is free software; you can distribute it and/or modify it7* under the terms of the GNU General Public License (Version 2) as8* published by the Free Software Foundation.9*10* This program is distributed in the hope it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* for more details.14*15* You should have received a copy of the GNU General Public License along16* with this program; if not, write to the Free Software Foundation, Inc.,17* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.18*19* ########################################################################20*21* Reset the MIPS boards.22*23*/24#include <linux/init.h>25#include <linux/pm.h>2627#include <asm/io.h>28#include <asm/reboot.h>29#include <asm/mips-boards/generic.h>3031static void mips_machine_restart(char *command)32{33unsigned int __iomem *softres_reg =34ioremap(SOFTRES_REG, sizeof(unsigned int));3536__raw_writel(GORESET, softres_reg);37}3839static void mips_machine_halt(void)40{41unsigned int __iomem *softres_reg =42ioremap(SOFTRES_REG, sizeof(unsigned int));4344__raw_writel(GORESET, softres_reg);45}464748static int __init mips_reboot_setup(void)49{50_machine_restart = mips_machine_restart;51_machine_halt = mips_machine_halt;52pm_power_off = mips_machine_halt;5354return 0;55}5657arch_initcall(mips_reboot_setup);585960