diff options
Diffstat (limited to 'arch/arm/mach-pxa/z2.c')
-rw-r--r-- | arch/arm/mach-pxa/z2.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c index fbe9e02e2f9f..6c9275a20c91 100644 --- a/arch/arm/mach-pxa/z2.c +++ b/arch/arm/mach-pxa/z2.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <mach/pxafb.h> | 40 | #include <mach/pxafb.h> |
41 | #include <mach/mmc.h> | 41 | #include <mach/mmc.h> |
42 | #include <plat/pxa27x_keypad.h> | 42 | #include <plat/pxa27x_keypad.h> |
43 | #include <mach/pm.h> | ||
43 | 44 | ||
44 | #include "generic.h" | 45 | #include "generic.h" |
45 | #include "devices.h" | 46 | #include "devices.h" |
@@ -677,6 +678,20 @@ static void __init z2_pmic_init(void) | |||
677 | static inline void z2_pmic_init(void) {} | 678 | static inline void z2_pmic_init(void) {} |
678 | #endif | 679 | #endif |
679 | 680 | ||
681 | #ifdef CONFIG_PM | ||
682 | static void z2_power_off(void) | ||
683 | { | ||
684 | /* We're using deep sleep as poweroff, so clear PSPR to ensure that | ||
685 | * bootloader will jump to its entry point in resume handler | ||
686 | */ | ||
687 | PSPR = 0x0; | ||
688 | local_irq_disable(); | ||
689 | pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP, PLAT_PHYS_OFFSET - PAGE_OFFSET); | ||
690 | } | ||
691 | #else | ||
692 | #define z2_power_off NULL | ||
693 | #endif | ||
694 | |||
680 | /****************************************************************************** | 695 | /****************************************************************************** |
681 | * Machine init | 696 | * Machine init |
682 | ******************************************************************************/ | 697 | ******************************************************************************/ |
@@ -698,12 +713,15 @@ static void __init z2_init(void) | |||
698 | z2_leds_init(); | 713 | z2_leds_init(); |
699 | z2_keys_init(); | 714 | z2_keys_init(); |
700 | z2_pmic_init(); | 715 | z2_pmic_init(); |
716 | |||
717 | pm_power_off = z2_power_off; | ||
701 | } | 718 | } |
702 | 719 | ||
703 | MACHINE_START(ZIPIT2, "Zipit Z2") | 720 | MACHINE_START(ZIPIT2, "Zipit Z2") |
704 | .boot_params = 0xa0000100, | 721 | .boot_params = 0xa0000100, |
705 | .map_io = pxa27x_map_io, | 722 | .map_io = pxa27x_map_io, |
706 | .init_irq = pxa27x_init_irq, | 723 | .init_irq = pxa27x_init_irq, |
724 | .handle_irq = pxa27x_handle_irq, | ||
707 | .timer = &pxa_timer, | 725 | .timer = &pxa_timer, |
708 | .init_machine = z2_init, | 726 | .init_machine = z2_init, |
709 | MACHINE_END | 727 | MACHINE_END |