From f6a63ff92808e6721a3c62dce117335047ef09ab Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Thu, 20 May 2010 12:56:45 +0900 Subject: [PATCH] --- yaml --- r: 198521 b: refs/heads/master c: fda225774ed0f3742eb2337680e5221dfa49dad8 h: refs/heads/master i: 198519: a55eb9ac6d79baee2931f63357a256f36e9854bd v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-s3c64xx/Kconfig | 1 + trunk/arch/arm/mach-s3c64xx/pm.c | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 10b2a6e6e686..dd7269c57f20 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0317e52e046f815b4ec4ac7876f63e4eb47696bd +refs/heads/master: fda225774ed0f3742eb2337680e5221dfa49dad8 diff --git a/trunk/arch/arm/mach-s3c64xx/Kconfig b/trunk/arch/arm/mach-s3c64xx/Kconfig index ccdde04f6feb..f5a59727949f 100644 --- a/trunk/arch/arm/mach-s3c64xx/Kconfig +++ b/trunk/arch/arm/mach-s3c64xx/Kconfig @@ -7,6 +7,7 @@ config PLAT_S3C64XX bool depends on ARCH_S3C64XX + select SAMSUNG_WAKEMASK default y help Base platform code for any Samsung S3C64XX device diff --git a/trunk/arch/arm/mach-s3c64xx/pm.c b/trunk/arch/arm/mach-s3c64xx/pm.c index b8ac4597fad7..79412f735a8d 100644 --- a/trunk/arch/arm/mach-s3c64xx/pm.c +++ b/trunk/arch/arm/mach-s3c64xx/pm.c @@ -18,8 +18,11 @@ #include #include +#include #include +#include + #include #include #include @@ -153,8 +156,25 @@ static void s3c64xx_cpu_suspend(void) panic("sleep resumed to originator?"); } +/* mapping of interrupts to parts of the wakeup mask */ +static struct samsung_wakeup_mask wake_irqs[] = { + { .irq = IRQ_RTC_ALARM, .bit = S3C64XX_PWRCFG_RTC_ALARM_DISABLE, }, + { .irq = IRQ_RTC_TIC, .bit = S3C64XX_PWRCFG_RTC_TICK_DISABLE, }, + { .irq = IRQ_PENDN, .bit = S3C64XX_PWRCFG_TS_DISABLE, }, + { .irq = IRQ_HSMMC0, .bit = S3C64XX_PWRCFG_MMC0_DISABLE, }, + { .irq = IRQ_HSMMC1, .bit = S3C64XX_PWRCFG_MMC1_DISABLE, }, + { .irq = IRQ_HSMMC2, .bit = S3C64XX_PWRCFG_MMC2_DISABLE, }, + { .irq = NO_WAKEUP_IRQ, .bit = S3C64XX_PWRCFG_BATF_DISABLE}, + { .irq = NO_WAKEUP_IRQ, .bit = S3C64XX_PWRCFG_MSM_DISABLE }, + { .irq = NO_WAKEUP_IRQ, .bit = S3C64XX_PWRCFG_HSI_DISABLE }, + { .irq = NO_WAKEUP_IRQ, .bit = S3C64XX_PWRCFG_MSM_DISABLE }, +}; + static void s3c64xx_pm_prepare(void) { + samsung_sync_wakemask(S3C64XX_PWR_CFG, + wake_irqs, ARRAY_SIZE(wake_irqs)); + /* store address of resume. */ __raw_writel(virt_to_phys(s3c_cpu_resume), S3C64XX_INFORM0);