summaryrefslogtreecommitdiff
path: root/arch/arm/mach-pxa/poodle.c
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2006-06-19 18:57:12 (GMT)
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-06-19 18:57:12 (GMT)
commit74617fb6b825ea370ae72565f7543306bc08ef6e (patch)
treeac6032e0b476f1bf61bf03aba44240e448739d57 /arch/arm/mach-pxa/poodle.c
parentb7408aff2d325581dcafffa5dbcc09c42ae64b5d (diff)
downloadlinux-fsl-qoriq-74617fb6b825ea370ae72565f7543306bc08ef6e.tar.xz
[ARM] 3593/1: Add reboot and shutdown handlers for Zaurus handhelds
Patch from Richard Purdie Add functionality to allow machine specific reboot handlers on ARM. Add machine specific reboot and poweroff handlers for all PXA Zaurus models. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/poodle.c')
-rw-r--r--arch/arm/mach-pxa/poodle.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index a042473..1d516d3 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -18,11 +18,13 @@
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/fb.h>
+#include <linux/pm.h>
#include <asm/hardware.h>
#include <asm/mach-types.h>
#include <asm/irq.h>
#include <asm/setup.h>
+#include <asm/system.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@@ -247,10 +249,25 @@ static struct platform_device *devices[] __initdata = {
&poodle_scoop_device,
};
+static void poodle_poweroff(void)
+{
+ RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
+ arm_machine_restart('h');
+}
+
+static void poodle_restart(char mode)
+{
+ RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
+ arm_machine_restart('h');
+}
+
static void __init poodle_init(void)
{
int ret = 0;
+ pm_power_off = poodle_poweroff;
+ arm_pm_restart = poodle_restart;
+
/* setup sleep mode values */
PWER = 0x00000002;
PFER = 0x00000000;