]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: GEODE: make sure the right MFGPT timer fired the timer tick
authorJordan Crouse <jordan.crouse@amd.com>
Sat, 9 Feb 2008 22:24:08 +0000 (23:24 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 9 Feb 2008 22:24:08 +0000 (23:24 +0100)
Each AMD Geode MFGPT timer interrupt output is paired with another
timer; esentially the interrupt goes if either timer fires.  This
is okay, but the handlers need to be aware of this.  Make sure in
the timer tick handler that our timer really did expire.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/mfgpt_32.c

index 81aa9db01f5f8d54b06ae07108cb8c53fe22930a..eeb461f391a074b0a77241d375bf2eb919b0799d 100644 (file)
@@ -293,10 +293,14 @@ static int mfgpt_next_event(unsigned long delta, struct clock_event_device *evt)
        return 0;
 }
 
-/* Assume (foolishly?), that this interrupt was due to our tick */
-
 static irqreturn_t mfgpt_tick(int irq, void *dev_id)
 {
+       u16 val = geode_mfgpt_read(mfgpt_event_clock, MFGPT_REG_SETUP);
+
+       /* See if the interrupt was for us */
+       if (!(val & (MFGPT_SETUP_SETUP  | MFGPT_SETUP_CMP2 | MFGPT_SETUP_CMP1)))
+               return IRQ_NONE;
+
        /* Turn off the clock (and clear the event) */
        mfgpt_disable_timer(mfgpt_event_clock);