diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2006-06-19 14:57:12 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-06-19 14:57:12 -0400 |
commit | 74617fb6b825ea370ae72565f7543306bc08ef6e (patch) | |
tree | ac6032e0b476f1bf61bf03aba44240e448739d57 /arch/arm/mach-pxa/poodle.c | |
parent | b7408aff2d325581dcafffa5dbcc09c42ae64b5d (diff) |
[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 a042473deedd..1d516d317e89 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -18,11 +18,13 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/fb.h> | 20 | #include <linux/fb.h> |
21 | #include <linux/pm.h> | ||
21 | 22 | ||
22 | #include <asm/hardware.h> | 23 | #include <asm/hardware.h> |
23 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
24 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
25 | #include <asm/setup.h> | 26 | #include <asm/setup.h> |
27 | #include <asm/system.h> | ||
26 | 28 | ||
27 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
28 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
@@ -247,10 +249,25 @@ static struct platform_device *devices[] __initdata = { | |||
247 | &poodle_scoop_device, | 249 | &poodle_scoop_device, |
248 | }; | 250 | }; |
249 | 251 | ||
252 | static void poodle_poweroff(void) | ||
253 | { | ||
254 | RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; | ||
255 | arm_machine_restart('h'); | ||
256 | } | ||
257 | |||
258 | static void poodle_restart(char mode) | ||
259 | { | ||
260 | RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; | ||
261 | arm_machine_restart('h'); | ||
262 | } | ||
263 | |||
250 | static void __init poodle_init(void) | 264 | static void __init poodle_init(void) |
251 | { | 265 | { |
252 | int ret = 0; | 266 | int ret = 0; |
253 | 267 | ||
268 | pm_power_off = poodle_poweroff; | ||
269 | arm_pm_restart = poodle_restart; | ||
270 | |||
254 | /* setup sleep mode values */ | 271 | /* setup sleep mode values */ |
255 | PWER = 0x00000002; | 272 | PWER = 0x00000002; |
256 | PFER = 0x00000000; | 273 | PFER = 0x00000000; |