diff options
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/corgi.c | 25 | ||||
-rw-r--r-- | arch/arm/mach-pxa/poodle.c | 17 | ||||
-rw-r--r-- | arch/arm/mach-pxa/spitz.c | 25 | ||||
-rw-r--r-- | arch/arm/mach-pxa/tosa.c | 25 |
4 files changed, 92 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index d6d726036361..bf6648a83901 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/mmc/host.h> | 21 | #include <linux/mmc/host.h> |
22 | #include <linux/pm.h> | ||
22 | 23 | ||
23 | #include <asm/setup.h> | 24 | #include <asm/setup.h> |
24 | #include <asm/memory.h> | 25 | #include <asm/memory.h> |
@@ -26,6 +27,7 @@ | |||
26 | #include <asm/hardware.h> | 27 | #include <asm/hardware.h> |
27 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
28 | #include <asm/io.h> | 29 | #include <asm/io.h> |
30 | #include <asm/system.h> | ||
29 | 31 | ||
30 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
31 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
@@ -310,8 +312,31 @@ static struct platform_device *devices[] __initdata = { | |||
310 | &corgiled_device, | 312 | &corgiled_device, |
311 | }; | 313 | }; |
312 | 314 | ||
315 | static void corgi_poweroff(void) | ||
316 | { | ||
317 | RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; | ||
318 | |||
319 | if (!machine_is_corgi()) | ||
320 | /* Green LED off tells the bootloader to halt */ | ||
321 | reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_LED_GREEN); | ||
322 | arm_machine_restart('h'); | ||
323 | } | ||
324 | |||
325 | static void corgi_restart(char mode) | ||
326 | { | ||
327 | RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; | ||
328 | |||
329 | if (!machine_is_corgi()) | ||
330 | /* Green LED on tells the bootloader to reboot */ | ||
331 | set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_LED_GREEN); | ||
332 | arm_machine_restart('h'); | ||
333 | } | ||
334 | |||
313 | static void __init corgi_init(void) | 335 | static void __init corgi_init(void) |
314 | { | 336 | { |
337 | pm_power_off = corgi_poweroff; | ||
338 | arm_pm_restart = corgi_restart; | ||
339 | |||
315 | /* setup sleep mode values */ | 340 | /* setup sleep mode values */ |
316 | PWER = 0x00000002; | 341 | PWER = 0x00000002; |
317 | PFER = 0x00000000; | 342 | PFER = 0x00000000; |
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; |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 44bcb8097c7a..eb9937f6f5cd 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/mmc/host.h> | 22 | #include <linux/mmc/host.h> |
23 | #include <linux/pm.h> | ||
23 | 24 | ||
24 | #include <asm/setup.h> | 25 | #include <asm/setup.h> |
25 | #include <asm/memory.h> | 26 | #include <asm/memory.h> |
@@ -27,6 +28,7 @@ | |||
27 | #include <asm/hardware.h> | 28 | #include <asm/hardware.h> |
28 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
29 | #include <asm/io.h> | 30 | #include <asm/io.h> |
31 | #include <asm/system.h> | ||
30 | 32 | ||
31 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/map.h> | 34 | #include <asm/mach/map.h> |
@@ -432,8 +434,31 @@ static struct platform_device *devices[] __initdata = { | |||
432 | &spitzled_device, | 434 | &spitzled_device, |
433 | }; | 435 | }; |
434 | 436 | ||
437 | static void spitz_poweroff(void) | ||
438 | { | ||
439 | RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; | ||
440 | |||
441 | pxa_gpio_mode(SPITZ_GPIO_ON_RESET | GPIO_OUT); | ||
442 | GPSR(SPITZ_GPIO_ON_RESET) = GPIO_bit(SPITZ_GPIO_ON_RESET); | ||
443 | |||
444 | mdelay(1000); | ||
445 | arm_machine_restart('h'); | ||
446 | } | ||
447 | |||
448 | static void spitz_restart(char mode) | ||
449 | { | ||
450 | /* Bootloader magic for a reboot */ | ||
451 | if((MSC0 & 0xffff0000) == 0x7ff00000) | ||
452 | MSC0 = (MSC0 & 0xffff) | 0x7ee00000; | ||
453 | |||
454 | spitz_poweroff(); | ||
455 | } | ||
456 | |||
435 | static void __init common_init(void) | 457 | static void __init common_init(void) |
436 | { | 458 | { |
459 | pm_power_off = spitz_poweroff; | ||
460 | arm_pm_restart = spitz_restart; | ||
461 | |||
437 | PMCR = 0x00; | 462 | PMCR = 0x00; |
438 | 463 | ||
439 | /* setup sleep mode values */ | 464 | /* setup sleep mode values */ |
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 76c0e7f0a219..afa223b9e7a2 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -19,12 +19,14 @@ | |||
19 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/mmc/host.h> | 21 | #include <linux/mmc/host.h> |
22 | #include <linux/pm.h> | ||
22 | 23 | ||
23 | #include <asm/setup.h> | 24 | #include <asm/setup.h> |
24 | #include <asm/memory.h> | 25 | #include <asm/memory.h> |
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
26 | #include <asm/hardware.h> | 27 | #include <asm/hardware.h> |
27 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
29 | #include <asm/system.h> | ||
28 | #include <asm/arch/irda.h> | 30 | #include <asm/arch/irda.h> |
29 | #include <asm/arch/mmc.h> | 31 | #include <asm/arch/mmc.h> |
30 | #include <asm/arch/udc.h> | 32 | #include <asm/arch/udc.h> |
@@ -266,8 +268,31 @@ static struct platform_device *devices[] __initdata = { | |||
266 | &tosaled_device, | 268 | &tosaled_device, |
267 | }; | 269 | }; |
268 | 270 | ||
271 | static void tosa_poweroff(void) | ||
272 | { | ||
273 | RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; | ||
274 | |||
275 | pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_OUT); | ||
276 | GPSR(TOSA_GPIO_ON_RESET) = GPIO_bit(TOSA_GPIO_ON_RESET); | ||
277 | |||
278 | mdelay(1000); | ||
279 | arm_machine_restart('h'); | ||
280 | } | ||
281 | |||
282 | static void tosa_restart(char mode) | ||
283 | { | ||
284 | /* Bootloader magic for a reboot */ | ||
285 | if((MSC0 & 0xffff0000) == 0x7ff00000) | ||
286 | MSC0 = (MSC0 & 0xffff) | 0x7ee00000; | ||
287 | |||
288 | tosa_poweroff(); | ||
289 | } | ||
290 | |||
269 | static void __init tosa_init(void) | 291 | static void __init tosa_init(void) |
270 | { | 292 | { |
293 | pm_power_off = tosa_poweroff; | ||
294 | arm_pm_restart = tosa_restart; | ||
295 | |||
271 | pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_IN); | 296 | pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_IN); |
272 | pxa_gpio_mode(TOSA_GPIO_TC6393_INT | GPIO_IN); | 297 | pxa_gpio_mode(TOSA_GPIO_TC6393_INT | GPIO_IN); |
273 | pxa_gpio_mode(TOSA_GPIO_USB_IN | GPIO_IN); | 298 | pxa_gpio_mode(TOSA_GPIO_USB_IN | GPIO_IN); |