From: Maxim Levitsky Date: Wed, 16 Dec 2009 00:45:52 +0000 (-0800) Subject: rtc: disable hpet emulation on suspend X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d1b2efa83fbf7b33919238fa29ef6ab935820103;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git rtc: disable hpet emulation on suspend I noticed that rtc wont generate interrupts after a resume from disk. Here hpet rtc emulation is used. Problem is that rtc hpet comparator, isn't reinitialized after resume. Easiest way to solve this, is always mask all hpet interrupts on suspend This is triggered, when suspending with alarm set. Otherwise, hpet driver will think it doesn't need to reinitialize the rtc comparator, thus rtc interrupts won't work. This emulation isn't need for wakealarm. Signed-off-by: Maxim Levitsky Cc: David Brownell Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "Rafael J. Wysocki" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index f7a4701bf863..876e3fcffca4 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -871,8 +871,9 @@ static int cmos_suspend(struct device *dev, pm_message_t mesg) mask = RTC_IRQMASK; tmp &= ~mask; CMOS_WRITE(tmp, RTC_CONTROL); - hpet_mask_rtc_irq_bit(mask); + /* shut down hpet emulation - we don't need it for alarm */ + hpet_mask_rtc_irq_bit(RTC_PIE|RTC_AIE|RTC_UIE); cmos_checkintr(cmos, tmp); } spin_unlock_irq(&rtc_lock);