Commit c1b47e95 authored by Ralf Baechle's avatar Ralf Baechle

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: default avatarRalf Baechle <ralf@linux-mips.org>
parent 863cb9ba
...@@ -22,29 +22,19 @@ ...@@ -22,29 +22,19 @@
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <asm/processor.h>
#include <asm/reboot.h> #include <asm/reboot.h>
#include <glb.h> #include <glb.h>
void pnx8550_machine_restart(char *command) void pnx8550_machine_restart(char *command)
{ {
char head[] = "************* Machine restart *************";
char foot[] = "*******************************************";
printk("\n\n");
printk("%s\n", head);
if (command != NULL)
printk("* %s\n", command);
printk("%s\n", foot);
PNX8550_RST_CTL = PNX8550_RST_DO_SW_RST; PNX8550_RST_CTL = PNX8550_RST_DO_SW_RST;
} }
void pnx8550_machine_halt(void) void pnx8550_machine_halt(void)
{ {
printk("*** Machine halt. (Not implemented) ***\n"); while (1) {
} if (cpu_wait)
cpu_wait();
void pnx8550_machine_power_off(void) }
{
printk("*** Machine power off. (Not implemented) ***\n");
} }
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
extern void __init board_setup(void); extern void __init board_setup(void);
extern void pnx8550_machine_restart(char *); extern void pnx8550_machine_restart(char *);
extern void pnx8550_machine_halt(void); extern void pnx8550_machine_halt(void);
extern void pnx8550_machine_power_off(void);
extern struct resource ioport_resource; extern struct resource ioport_resource;
extern struct resource iomem_resource; extern struct resource iomem_resource;
extern char *prom_getcmdline(void); extern char *prom_getcmdline(void);
...@@ -100,7 +99,7 @@ void __init plat_mem_setup(void) ...@@ -100,7 +99,7 @@ void __init plat_mem_setup(void)
_machine_restart = pnx8550_machine_restart; _machine_restart = pnx8550_machine_restart;
_machine_halt = pnx8550_machine_halt; _machine_halt = pnx8550_machine_halt;
pm_power_off = pnx8550_machine_power_off; pm_power_off = pnx8550_machine_halt;
/* Clear the Global 2 Register, PCI Inta Output Enable Registers /* Clear the Global 2 Register, PCI Inta Output Enable Registers
Bit 1:Enable DAC Powerdown Bit 1:Enable DAC Powerdown
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment