diff options
-rw-r--r-- | arch/sparc/include/asm/auxio_32.h | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/auxio_32.c | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/process_32.c | 8 |
3 files changed, 10 insertions, 6 deletions
diff --git a/arch/sparc/include/asm/auxio_32.h b/arch/sparc/include/asm/auxio_32.h index 3a319775ae37..b81666043c0b 100644 --- a/arch/sparc/include/asm/auxio_32.h +++ b/arch/sparc/include/asm/auxio_32.h | |||
@@ -78,7 +78,7 @@ do { \ | |||
78 | 78 | ||
79 | 79 | ||
80 | /* AUXIO2 (Power Off Control) */ | 80 | /* AUXIO2 (Power Off Control) */ |
81 | extern __volatile__ unsigned char * auxio_power_register; | 81 | extern volatile u8 __iomem *auxio_power_register; |
82 | 82 | ||
83 | #define AUXIO_POWER_DETECT_FAILURE 32 | 83 | #define AUXIO_POWER_DETECT_FAILURE 32 |
84 | #define AUXIO_POWER_CLEAR_FAILURE 2 | 84 | #define AUXIO_POWER_CLEAR_FAILURE 2 |
diff --git a/arch/sparc/kernel/auxio_32.c b/arch/sparc/kernel/auxio_32.c index c6fc1d451407..ae88c223e4d3 100644 --- a/arch/sparc/kernel/auxio_32.c +++ b/arch/sparc/kernel/auxio_32.c | |||
@@ -106,7 +106,7 @@ EXPORT_SYMBOL(set_auxio); | |||
106 | 106 | ||
107 | /* sun4m power control register (AUXIO2) */ | 107 | /* sun4m power control register (AUXIO2) */ |
108 | 108 | ||
109 | volatile unsigned char * auxio_power_register = NULL; | 109 | volatile u8 __iomem *auxio_power_register = NULL; |
110 | 110 | ||
111 | void __init auxio_power_probe(void) | 111 | void __init auxio_power_probe(void) |
112 | { | 112 | { |
@@ -130,8 +130,8 @@ void __init auxio_power_probe(void) | |||
130 | r.flags = regs.which_io & 0xF; | 130 | r.flags = regs.which_io & 0xF; |
131 | r.start = regs.phys_addr; | 131 | r.start = regs.phys_addr; |
132 | r.end = regs.phys_addr + regs.reg_size - 1; | 132 | r.end = regs.phys_addr + regs.reg_size - 1; |
133 | auxio_power_register = (unsigned char *) of_ioremap(&r, 0, | 133 | auxio_power_register = |
134 | regs.reg_size, "auxpower"); | 134 | (u8 __iomem *)of_ioremap(&r, 0, regs.reg_size, "auxpower"); |
135 | 135 | ||
136 | /* Display a quick message on the console. */ | 136 | /* Display a quick message on the console. */ |
137 | if (auxio_power_register) | 137 | if (auxio_power_register) |
diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c index 61f810b0a9d9..50e7b626afe8 100644 --- a/arch/sparc/kernel/process_32.c +++ b/arch/sparc/kernel/process_32.c | |||
@@ -106,8 +106,12 @@ void machine_restart(char * cmd) | |||
106 | void machine_power_off(void) | 106 | void machine_power_off(void) |
107 | { | 107 | { |
108 | if (auxio_power_register && | 108 | if (auxio_power_register && |
109 | (strcmp(of_console_device->type, "serial") || scons_pwroff)) | 109 | (strcmp(of_console_device->type, "serial") || scons_pwroff)) { |
110 | *auxio_power_register |= AUXIO_POWER_OFF; | 110 | u8 power_register = sbus_readb(auxio_power_register); |
111 | power_register |= AUXIO_POWER_OFF; | ||
112 | sbus_writeb(power_register, auxio_power_register); | ||
113 | } | ||
114 | |||
111 | machine_halt(); | 115 | machine_halt(); |
112 | } | 116 | } |
113 | 117 | ||