diff options
Diffstat (limited to 'arch/arm/mach-pxa/pxa25x.c')
-rw-r--r-- | arch/arm/mach-pxa/pxa25x.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index e887b7175ef3..7869c3b4e62f 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * initialization stuff for PXA machines which can be overridden later if | 16 | * initialization stuff for PXA machines which can be overridden later if |
17 | * need be. | 17 | * need be. |
18 | */ | 18 | */ |
19 | #include <linux/config.h> | ||
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
20 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
@@ -102,3 +103,35 @@ unsigned int get_lcdclk_frequency_10khz(void) | |||
102 | } | 103 | } |
103 | 104 | ||
104 | EXPORT_SYMBOL(get_lcdclk_frequency_10khz); | 105 | EXPORT_SYMBOL(get_lcdclk_frequency_10khz); |
106 | |||
107 | #ifdef CONFIG_PM | ||
108 | |||
109 | int pxa_cpu_pm_prepare(suspend_state_t state) | ||
110 | { | ||
111 | switch (state) { | ||
112 | case PM_SUSPEND_MEM: | ||
113 | break; | ||
114 | default: | ||
115 | return -EINVAL; | ||
116 | } | ||
117 | |||
118 | return 0; | ||
119 | } | ||
120 | |||
121 | void pxa_cpu_pm_enter(suspend_state_t state) | ||
122 | { | ||
123 | extern void pxa_cpu_suspend(unsigned int); | ||
124 | extern void pxa_cpu_resume(void); | ||
125 | |||
126 | CKEN = 0; | ||
127 | |||
128 | switch (state) { | ||
129 | case PM_SUSPEND_MEM: | ||
130 | /* set resume return address */ | ||
131 | PSPR = virt_to_phys(pxa_cpu_resume); | ||
132 | pxa_cpu_suspend(3); | ||
133 | break; | ||
134 | } | ||
135 | } | ||
136 | |||
137 | #endif | ||