diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2010-09-18 19:09:09 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-10-04 13:33:57 -0400 |
commit | c1b47e9508f74c152407323260f9fbb980d2fde1 (patch) | |
tree | 3e913dd2799fad90bc0856ced4826e97ade33480 | |
parent | 863cb9bad8f992a9c171e90552045eac77808e84 (diff) |
MIPS: PNX8550: Sort out machine halt, restart and powerdown functions.
No rubbish printks - those belong to userspace. The halt function now
actually halts the system and the poweroff function was deleted because
it didn't actually power down the system.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/pnx8550/common/reset.c | 20 | ||||
-rw-r--r-- | arch/mips/pnx8550/common/setup.c | 3 |
2 files changed, 6 insertions, 17 deletions
diff --git a/arch/mips/pnx8550/common/reset.c b/arch/mips/pnx8550/common/reset.c index fadd8744a6bc..e7a12ff304b9 100644 --- a/arch/mips/pnx8550/common/reset.c +++ b/arch/mips/pnx8550/common/reset.c | |||
@@ -22,29 +22,19 @@ | |||
22 | */ | 22 | */ |
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | 24 | ||
25 | #include <asm/processor.h> | ||
25 | #include <asm/reboot.h> | 26 | #include <asm/reboot.h> |
26 | #include <glb.h> | 27 | #include <glb.h> |
27 | 28 | ||
28 | void pnx8550_machine_restart(char *command) | 29 | void pnx8550_machine_restart(char *command) |
29 | { | 30 | { |
30 | char head[] = "************* Machine restart *************"; | ||
31 | char foot[] = "*******************************************"; | ||
32 | |||
33 | printk("\n\n"); | ||
34 | printk("%s\n", head); | ||
35 | if (command != NULL) | ||
36 | printk("* %s\n", command); | ||
37 | printk("%s\n", foot); | ||
38 | |||
39 | PNX8550_RST_CTL = PNX8550_RST_DO_SW_RST; | 31 | PNX8550_RST_CTL = PNX8550_RST_DO_SW_RST; |
40 | } | 32 | } |
41 | 33 | ||
42 | void pnx8550_machine_halt(void) | 34 | void pnx8550_machine_halt(void) |
43 | { | 35 | { |
44 | printk("*** Machine halt. (Not implemented) ***\n"); | 36 | while (1) { |
45 | } | 37 | if (cpu_wait) |
46 | 38 | cpu_wait(); | |
47 | void pnx8550_machine_power_off(void) | 39 | } |
48 | { | ||
49 | printk("*** Machine power off. (Not implemented) ***\n"); | ||
50 | } | 40 | } |
diff --git a/arch/mips/pnx8550/common/setup.c b/arch/mips/pnx8550/common/setup.c index 64246c9c875c..43cb3945fdbf 100644 --- a/arch/mips/pnx8550/common/setup.c +++ b/arch/mips/pnx8550/common/setup.c | |||
@@ -44,7 +44,6 @@ | |||
44 | extern void __init board_setup(void); | 44 | extern void __init board_setup(void); |
45 | extern void pnx8550_machine_restart(char *); | 45 | extern void pnx8550_machine_restart(char *); |
46 | extern void pnx8550_machine_halt(void); | 46 | extern void pnx8550_machine_halt(void); |
47 | extern void pnx8550_machine_power_off(void); | ||
48 | extern struct resource ioport_resource; | 47 | extern struct resource ioport_resource; |
49 | extern struct resource iomem_resource; | 48 | extern struct resource iomem_resource; |
50 | extern char *prom_getcmdline(void); | 49 | extern char *prom_getcmdline(void); |
@@ -100,7 +99,7 @@ void __init plat_mem_setup(void) | |||
100 | 99 | ||
101 | _machine_restart = pnx8550_machine_restart; | 100 | _machine_restart = pnx8550_machine_restart; |
102 | _machine_halt = pnx8550_machine_halt; | 101 | _machine_halt = pnx8550_machine_halt; |
103 | pm_power_off = pnx8550_machine_power_off; | 102 | pm_power_off = pnx8550_machine_halt; |
104 | 103 | ||
105 | /* Clear the Global 2 Register, PCI Inta Output Enable Registers | 104 | /* Clear the Global 2 Register, PCI Inta Output Enable Registers |
106 | Bit 1:Enable DAC Powerdown | 105 | Bit 1:Enable DAC Powerdown |