diff options
Diffstat (limited to 'arch/arm/mach-s3c64xx/pm.c')
-rw-r--r-- | arch/arm/mach-s3c64xx/pm.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c index b8ac4597fad7..79412f735a8d 100644 --- a/arch/arm/mach-s3c64xx/pm.c +++ b/arch/arm/mach-s3c64xx/pm.c | |||
@@ -18,8 +18,11 @@ | |||
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | 19 | ||
20 | #include <mach/map.h> | 20 | #include <mach/map.h> |
21 | #include <mach/irqs.h> | ||
21 | 22 | ||
22 | #include <plat/pm.h> | 23 | #include <plat/pm.h> |
24 | #include <plat/wakeup-mask.h> | ||
25 | |||
23 | #include <mach/regs-sys.h> | 26 | #include <mach/regs-sys.h> |
24 | #include <mach/regs-gpio.h> | 27 | #include <mach/regs-gpio.h> |
25 | #include <mach/regs-clock.h> | 28 | #include <mach/regs-clock.h> |
@@ -153,8 +156,25 @@ static void s3c64xx_cpu_suspend(void) | |||
153 | panic("sleep resumed to originator?"); | 156 | panic("sleep resumed to originator?"); |
154 | } | 157 | } |
155 | 158 | ||
159 | /* mapping of interrupts to parts of the wakeup mask */ | ||
160 | static struct samsung_wakeup_mask wake_irqs[] = { | ||
161 | { .irq = IRQ_RTC_ALARM, .bit = S3C64XX_PWRCFG_RTC_ALARM_DISABLE, }, | ||
162 | { .irq = IRQ_RTC_TIC, .bit = S3C64XX_PWRCFG_RTC_TICK_DISABLE, }, | ||
163 | { .irq = IRQ_PENDN, .bit = S3C64XX_PWRCFG_TS_DISABLE, }, | ||
164 | { .irq = IRQ_HSMMC0, .bit = S3C64XX_PWRCFG_MMC0_DISABLE, }, | ||
165 | { .irq = IRQ_HSMMC1, .bit = S3C64XX_PWRCFG_MMC1_DISABLE, }, | ||
166 | { .irq = IRQ_HSMMC2, .bit = S3C64XX_PWRCFG_MMC2_DISABLE, }, | ||
167 | { .irq = NO_WAKEUP_IRQ, .bit = S3C64XX_PWRCFG_BATF_DISABLE}, | ||
168 | { .irq = NO_WAKEUP_IRQ, .bit = S3C64XX_PWRCFG_MSM_DISABLE }, | ||
169 | { .irq = NO_WAKEUP_IRQ, .bit = S3C64XX_PWRCFG_HSI_DISABLE }, | ||
170 | { .irq = NO_WAKEUP_IRQ, .bit = S3C64XX_PWRCFG_MSM_DISABLE }, | ||
171 | }; | ||
172 | |||
156 | static void s3c64xx_pm_prepare(void) | 173 | static void s3c64xx_pm_prepare(void) |
157 | { | 174 | { |
175 | samsung_sync_wakemask(S3C64XX_PWR_CFG, | ||
176 | wake_irqs, ARRAY_SIZE(wake_irqs)); | ||
177 | |||
158 | /* store address of resume. */ | 178 | /* store address of resume. */ |
159 | __raw_writel(virt_to_phys(s3c_cpu_resume), S3C64XX_INFORM0); | 179 | __raw_writel(virt_to_phys(s3c_cpu_resume), S3C64XX_INFORM0); |
160 | 180 | ||