diff options
author | Ben Dooks <ben-linux@fluff.org> | 2010-05-20 12:56:45 +0900 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-05-20 21:07:08 +0900 |
commit | fda225774ed0f3742eb2337680e5221dfa49dad8 (patch) | |
tree | 55dc1d380f1e8cfc5ae2867b19201f677edf7e9d /arch/arm/mach-s3c64xx | |
parent | 0317e52e046f815b4ec4ac7876f63e4eb47696bd (diff) | |
download | blackbird-op-linux-fda225774ed0f3742eb2337680e5221dfa49dad8.tar.gz blackbird-op-linux-fda225774ed0f3742eb2337680e5221dfa49dad8.zip |
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/mach-s3c64xx')
-rw-r--r-- | arch/arm/mach-s3c64xx/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/pm.c | 20 |
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 @@ 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/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 @@ #include <linux/io.h> #include <mach/map.h> +#include <mach/irqs.h> #include <plat/pm.h> +#include <plat/wakeup-mask.h> + #include <mach/regs-sys.h> #include <mach/regs-gpio.h> #include <mach/regs-clock.h> @@ -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); |