Skip to content

Commit fda2257

Browse files
author
Ben Dooks
committed
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>
1 parent 0317e52 commit fda2257

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

‎arch/arm/mach-s3c64xx/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
config PLAT_S3C64XX
88
bool
99
depends on ARCH_S3C64XX
10+
select SAMSUNG_WAKEMASK
1011
default y
1112
help
1213
Base platform code for any Samsung S3C64XX device

‎arch/arm/mach-s3c64xx/pm.c‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@
1818
#include <linux/io.h>
1919

2020
#include <mach/map.h>
21+
#include <mach/irqs.h>
2122

2223
#include <plat/pm.h>
24+
#include <plat/wakeup-mask.h>
25+
2326
#include <mach/regs-sys.h>
2427
#include <mach/regs-gpio.h>
2528
#include <mach/regs-clock.h>
@@ -153,8 +156,25 @@ static void s3c64xx_cpu_suspend(void)
153156
panic("sleep resumed to originator?");
154157
}
155158

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+
156173
static void s3c64xx_pm_prepare(void)
157174
{
175+
samsung_sync_wakemask(S3C64XX_PWR_CFG,
176+
wake_irqs, ARRAY_SIZE(wake_irqs));
177+
158178
/* store address of resume. */
159179
__raw_writel(virt_to_phys(s3c_cpu_resume), S3C64XX_INFORM0);
160180

0 commit comments

Comments
 (0)