]>
git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/blob - arch/mips/vr41xx/common/pmu.c
2 * pmu.c, Power Management Unit routines for NEC VR4100 series.
4 * Copyright (C) 2003-2004 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #include <linux/init.h>
21 #include <linux/kernel.h>
22 #include <linux/smp.h>
23 #include <linux/types.h>
27 #include <asm/reboot.h>
28 #include <asm/system.h>
30 #define PMUCNT2REG KSEG1ADDR(0x0f0000c6)
31 #define SOFTRST 0x0010
33 static inline void software_reset(void)
37 switch (current_cpu_data
.cputype
) {
41 val
= readw(PMUCNT2REG
);
43 writew(val
, PMUCNT2REG
);
50 static void vr41xx_restart(char *command
)
54 printk(KERN_NOTICE
"\nYou can reset your system\n");
58 static void vr41xx_halt(void)
61 printk(KERN_NOTICE
"\nYou can turn off the power supply\n");
65 static void vr41xx_power_off(void)
68 printk(KERN_NOTICE
"\nYou can turn off the power supply\n");
72 static int __init
vr41xx_pmu_init(void)
74 _machine_restart
= vr41xx_restart
;
75 _machine_halt
= vr41xx_halt
;
76 _machine_power_off
= vr41xx_power_off
;
81 early_initcall(vr41xx_pmu_init
);