提交 d1b2efa8 编写于 作者: M Maxim Levitsky 提交者: Linus Torvalds

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: NMaxim 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: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 213614d5
...@@ -871,8 +871,9 @@ static int cmos_suspend(struct device *dev, pm_message_t mesg) ...@@ -871,8 +871,9 @@ static int cmos_suspend(struct device *dev, pm_message_t mesg)
mask = RTC_IRQMASK; mask = RTC_IRQMASK;
tmp &= ~mask; tmp &= ~mask;
CMOS_WRITE(tmp, RTC_CONTROL); 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); cmos_checkintr(cmos, tmp);
} }
spin_unlock_irq(&rtc_lock); spin_unlock_irq(&rtc_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册