]> git.karo-electronics.de Git - karo-tx-linux.git/commit
x86, hpet: Immediately disable HPET timer 1 if rtc irq is masked
authorMark Langsdorf <mark.langsdorf@amd.com>
Fri, 18 Nov 2011 15:33:06 +0000 (16:33 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 21 Dec 2011 20:57:39 +0000 (12:57 -0800)
commitf4347eb6d2aae437d9552a26704bcb07f4626d6c
treee78b2d81528b5e143d8e17fd0fbf9cf83c56bb7e
parent53824693961bf513fe152d35c887e83eb016eaea
x86, hpet: Immediately disable HPET timer 1 if rtc irq is masked

commit 2ded6e6a94c98ea453a156748cb7fabaf39a76b9 upstream.

When HPET is operating in RTC mode, the TN_ENABLE bit on timer1
controls whether the HPET or the RTC delivers interrupts to irq8. When
the system goes into suspend, the RTC driver sends a signal to the
HPET driver so that the HPET releases control of irq8, allowing the
RTC to wake the system from suspend. The switchover is accomplished by
a write to the HPET configuration registers which currently only
occurs while servicing the HPET interrupt.

On some systems, I have seen the system suspend before an HPET
interrupt occurs, preventing the write to the HPET configuration
register and leaving the HPET in control of the irq8. As the HPET is
not active during suspend, it does not generate a wake signal and RTC
alarms do not work.

This patch forces the HPET driver to immediately transfer control of
the irq8 channel to the RTC instead of waiting until the next
interrupt event.

Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Link: http://lkml.kernel.org/r/20111118153306.GB16319@alberich.amd.com
Tested-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kernel/hpet.c