aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/ps3/setup.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-19 13:05:14 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-19 13:05:14 -0800
commit5c56f466835d20fc4f7119063a8c029f7170a317 (patch)
treecfa8afcea4defb59de32c501245bae16d0fdc5d0 /arch/powerpc/platforms/ps3/setup.c
parentdd397a6d1ae125686d97a20f983778c331093206 (diff)
parentc2944612cf30aece4526f23e96e1d234a1870ed6 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (34 commits) [POWERPC] 86xx: Cleaned up platform dts files [POWERPC] 85xx: Renamed MPC8568 MDS board code to match other boards [POWERPC] 85xx: Cleaning up machine probing [POWERPC] QE: clean up ucc_slow.c and ucc_fast.c [POWERPC] 85xx: Cleaned up platform dts files [POWERPC] 83xx: Renamed MPC8323 MDS dts and defconfig to match other boards [POWERPC] 83xx: Updated and renamed MPC8360PB to MPC836x MDS [POWERPC] 83xx: Use of_platform_bus_probe to setup QE devices [POWERPC] 83xx: use default value of loops_per_jiffy [POWERPC] 83xx: Remove obsolete setting of ROOT_DEV. [POWERPC] 83xx: Cleaning up machine probing and board initcalls [POWERPC] Dispose irq mapping when done in mpc52xx_serial.c [POWERPC] 86xx: Add missing of_node_put() in mpc86xx_hpcn_init_irq(). [POWERPC] 8[56]xx: Remove obsolete setting of ROOT_DEV for 85xx and 86xx platforms. [POWERPC] pseries: Enabling auto poweron after power is restored. [POWERPC] use winbond libata instead of ide driver for pseries CD drives [POWERPC] powerpc: remove references to the obsolete linux,platform property [POWERPC] add of_get_mac_address and update fsl_soc.c to use it [POWERPC] 83xx: Cleaned up 83xx platform dts files [POWERPC] Fix bug with early ioremap and 64k pages ...
Diffstat (limited to 'arch/powerpc/platforms/ps3/setup.c')
-rw-r--r--arch/powerpc/platforms/ps3/setup.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index 13d669a8eca..ac5df9688dc 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -42,6 +42,10 @@
#define DBG(fmt...) do{if(0)printk(fmt);}while(0)
#endif
+#if !defined(CONFIG_SMP)
+static void smp_send_stop(void) {}
+#endif
+
int ps3_get_firmware_version(union ps3_firmware_version *v)
{
int result = lv1_get_version_info(&v->raw);
@@ -66,22 +70,35 @@ static void ps3_power_save(void)
lv1_pause(0);
}
+static void ps3_restart(char *cmd)
+{
+ DBG("%s:%d cmd '%s'\n", __func__, __LINE__, cmd);
+
+ smp_send_stop();
+ ps3_sys_manager_restart(); /* never returns */
+}
+
+static void ps3_power_off(void)
+{
+ DBG("%s:%d\n", __func__, __LINE__);
+
+ smp_send_stop();
+ ps3_sys_manager_power_off(); /* never returns */
+}
+
static void ps3_panic(char *str)
{
DBG("%s:%d %s\n", __func__, __LINE__, str);
-#ifdef CONFIG_SMP
smp_send_stop();
-#endif
printk("\n");
printk(" System does not reboot automatically.\n");
printk(" Please press POWER button.\n");
printk("\n");
- for (;;) ;
+ while(1);
}
-
static void prealloc(struct ps3_prealloc *p)
{
if (!p->size)
@@ -219,6 +236,8 @@ define_machine(ps3) {
.get_rtc_time = ps3_get_rtc_time,
.calibrate_decr = ps3_calibrate_decr,
.progress = ps3_progress,
+ .restart = ps3_restart,
+ .power_off = ps3_power_off,
#if defined(CONFIG_KEXEC)
.kexec_cpu_down = ps3_kexec_cpu_down,
.machine_kexec = ps3_machine_kexec,