2 * arch/mips/ifxmips/prom.c
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18 * Copyright (C) 2005 infineon
20 * Rewrite of Infineon IFXMips code, thanks to infineon for the support,
21 * software and hardware
23 * Copyright (C) 2007 John Crispin <blogic@openwrt.org>
27 #include <linux/kernel.h>
29 #include <asm/reboot.h>
30 #include <asm/system.h>
32 #include <asm/ifxmips/ifxmips.h>
35 ifxmips_machine_restart (char *command
)
37 printk (KERN_NOTICE
"System restart\n");
40 writel(readl(IFXMIPS_RCU_REQ
) | IFXMIPS_RST_ALL
, IFXMIPS_RCU_REQ
);
45 ifxmips_machine_halt (void)
47 printk (KERN_NOTICE
"System halted.\n");
53 ifxmips_machine_power_off (void)
55 printk (KERN_NOTICE
"Please turn off the power now.\n");
61 ifxmips_reboot_setup (void)
63 _machine_restart
= ifxmips_machine_restart
;
64 _machine_halt
= ifxmips_machine_halt
;
65 pm_power_off
= ifxmips_machine_power_off
;