aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2010-05-19 23:56:45 -0400
committerBen Dooks <ben-linux@fluff.org>2010-05-20 08:07:08 -0400
commitfda225774ed0f3742eb2337680e5221dfa49dad8 (patch)
tree55dc1d380f1e8cfc5ae2867b19201f677edf7e9d /arch/arm
parent0317e52e046f815b4ec4ac7876f63e4eb47696bd (diff)
ARM: S3C64XX: PM: Synchronise wakeup mask on suspend
Use the new wakeup mask synchronisation code to set the relevant wakeup mask bits. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-s3c64xx/Kconfig1
-rw-r--r--arch/arm/mach-s3c64xx/pm.c20
2 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index ccdde04f6feb..f5a59727949f 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -7,6 +7,7 @@
7config PLAT_S3C64XX 7config PLAT_S3C64XX
8 bool 8 bool
9 depends on ARCH_S3C64XX 9 depends on ARCH_S3C64XX
10 select SAMSUNG_WAKEMASK
10 default y 11 default y
11 help 12 help
12 Base platform code for any Samsung S3C64XX device 13 Base platform code for any Samsung S3C64XX device
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 */
160static 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
156static void s3c64xx_pm_prepare(void) 173static 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