From 9c1b9e1f248089d75ad62a9f17378a58090c34d7 Mon Sep 17 00:00:00 2001 From: Vasily Khoruzhick Date: Tue, 15 Mar 2011 22:11:17 +0200 Subject: [PATCH] --- yaml --- r: 260570 b: refs/heads/master c: 41646b24993590c49d21e6cc0f4378505e1f94a6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-pxa/z2.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a04cb9f54541..b4bbdd771834 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8a97ae2f554d762a4bc67b5d13b52ef39c8d6baa +refs/heads/master: 41646b24993590c49d21e6cc0f4378505e1f94a6 diff --git a/trunk/arch/arm/mach-pxa/z2.c b/trunk/arch/arm/mach-pxa/z2.c index e9b38cdc9269..6c9275a20c91 100644 --- a/trunk/arch/arm/mach-pxa/z2.c +++ b/trunk/arch/arm/mach-pxa/z2.c @@ -40,6 +40,7 @@ #include #include #include +#include #include "generic.h" #include "devices.h" @@ -677,6 +678,20 @@ static void __init z2_pmic_init(void) static inline void z2_pmic_init(void) {} #endif +#ifdef CONFIG_PM +static void z2_power_off(void) +{ + /* We're using deep sleep as poweroff, so clear PSPR to ensure that + * bootloader will jump to its entry point in resume handler + */ + PSPR = 0x0; + local_irq_disable(); + pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP, PLAT_PHYS_OFFSET - PAGE_OFFSET); +} +#else +#define z2_power_off NULL +#endif + /****************************************************************************** * Machine init ******************************************************************************/ @@ -698,6 +713,8 @@ static void __init z2_init(void) z2_leds_init(); z2_keys_init(); z2_pmic_init(); + + pm_power_off = z2_power_off; } MACHINE_START(ZIPIT2, "Zipit Z2")