aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-cmos.c
diff options
context:
space:
mode:
authorMaxim Levitsky <maximlevitsky@gmail.com>2009-12-15 19:45:52 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 10:19:58 -0500
commitd1b2efa83fbf7b33919238fa29ef6ab935820103 (patch)
tree57fd4462744112f9106b4e4e344c95b9008e1e5c /drivers/rtc/rtc-cmos.c
parent213614d583748d00967a91cacd656f417efb36ce (diff)
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 <maximlevitsky@gmail.com> Cc: David Brownell <david-b@pacbell.net> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-cmos.c')
-rw-r--r--drivers/rtc/rtc-cmos.c3
1 files changed, 2 insertions, 1 deletions
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)
871 mask = RTC_IRQMASK; 871 mask = RTC_IRQMASK;
872 tmp &= ~mask; 872 tmp &= ~mask;
873 CMOS_WRITE(tmp, RTC_CONTROL); 873 CMOS_WRITE(tmp, RTC_CONTROL);
874 hpet_mask_rtc_irq_bit(mask);
875 874
875 /* shut down hpet emulation - we don't need it for alarm */
876 hpet_mask_rtc_irq_bit(RTC_PIE|RTC_AIE|RTC_UIE);
876 cmos_checkintr(cmos, tmp); 877 cmos_checkintr(cmos, tmp);
877 } 878 }
878 spin_unlock_irq(&rtc_lock); 879 spin_unlock_irq(&rtc_lock);