aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/power.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/power.c')
-rw-r--r--arch/sparc64/kernel/power.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/arch/sparc64/kernel/power.c b/arch/sparc64/kernel/power.c
index 7559ad395a33..076cad7f9757 100644
--- a/arch/sparc64/kernel/power.c
+++ b/arch/sparc64/kernel/power.c
@@ -7,21 +7,11 @@
7#include <linux/module.h> 7#include <linux/module.h>
8#include <linux/init.h> 8#include <linux/init.h>
9#include <linux/interrupt.h> 9#include <linux/interrupt.h>
10#include <linux/pm.h>
11#include <linux/reboot.h> 10#include <linux/reboot.h>
12#include <linux/of_device.h> 11#include <linux/of_device.h>
13 12
14#include <asm/auxio.h>
15#include <asm/prom.h> 13#include <asm/prom.h>
16#include <asm/io.h> 14#include <asm/io.h>
17#include <asm/sstate.h>
18#include <asm/reboot.h>
19
20/*
21 * sysctl - toggle power-off restriction for serial console
22 * systems in machine_power_off()
23 */
24int scons_pwroff = 1;
25 15
26static void __iomem *power_reg; 16static void __iomem *power_reg;
27 17
@@ -33,31 +23,6 @@ static irqreturn_t power_handler(int irq, void *dev_id)
33 return IRQ_HANDLED; 23 return IRQ_HANDLED;
34} 24}
35 25
36static void (*poweroff_method)(void) = machine_alt_power_off;
37
38void machine_power_off(void)
39{
40 sstate_poweroff();
41 if (strcmp(of_console_device->type, "serial") || scons_pwroff) {
42 if (power_reg) {
43 /* Both register bits seem to have the
44 * same effect, so until I figure out
45 * what the difference is...
46 */
47 writel(AUXIO_PCIO_CPWR_OFF | AUXIO_PCIO_SPWR_OFF, power_reg);
48 } else {
49 if (poweroff_method != NULL) {
50 poweroff_method();
51 /* not reached */
52 }
53 }
54 }
55 machine_halt();
56}
57
58void (*pm_power_off)(void) = machine_power_off;
59EXPORT_SYMBOL(pm_power_off);
60
61static int __init has_button_interrupt(unsigned int irq, struct device_node *dp) 26static int __init has_button_interrupt(unsigned int irq, struct device_node *dp)
62{ 27{
63 if (irq == 0xffffffff) 28 if (irq == 0xffffffff)
@@ -78,8 +43,6 @@ static int __devinit power_probe(struct of_device *op, const struct of_device_id
78 printk(KERN_INFO "%s: Control reg at %lx\n", 43 printk(KERN_INFO "%s: Control reg at %lx\n",
79 op->node->name, res->start); 44 op->node->name, res->start);
80 45
81 poweroff_method = machine_halt; /* able to use the standard halt */
82
83 if (has_button_interrupt(irq, op->node)) { 46 if (has_button_interrupt(irq, op->node)) {
84 if (request_irq(irq, 47 if (request_irq(irq,
85 power_handler, 0, "power", NULL) < 0) 48 power_handler, 0, "power", NULL) < 0)