diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2006-06-19 19:57:12 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-06-19 19:57:12 +0100 |
commit | 74617fb6b825ea370ae72565f7543306bc08ef6e (patch) | |
tree | ac6032e0b476f1bf61bf03aba44240e448739d57 /arch/arm/mach-pxa/poodle.c | |
parent | b7408aff2d325581dcafffa5dbcc09c42ae64b5d (diff) | |
download | op-kernel-dev-74617fb6b825ea370ae72565f7543306bc08ef6e.zip op-kernel-dev-74617fb6b825ea370ae72565f7543306bc08ef6e.tar.gz |
[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.c | 17 |
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; |