]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/hpet.c
Pull bugzilla-9747 into release branch
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / hpet.c
index 53303f2e547582e282f5a941cc2311b79a821238..2f99ee206b9527c3cad6250caa95e2a3ceac9268 100644 (file)
@@ -446,6 +446,20 @@ static __init int hpet_late_init(void)
 }
 fs_initcall(hpet_late_init);
 
+void hpet_disable(void)
+{
+       if (is_hpet_capable()) {
+               unsigned long cfg = hpet_readl(HPET_CFG);
+
+               if (hpet_legacy_int_enabled) {
+                       cfg &= ~HPET_CFG_LEGACY;
+                       hpet_legacy_int_enabled = 0;
+               }
+               cfg &= ~HPET_CFG_ENABLE;
+               hpet_writel(cfg, HPET_CFG);
+       }
+}
+
 #ifdef CONFIG_HPET_EMULATE_RTC
 
 /* HPET in LegacyReplacement Mode eats up RTC interrupt line. When, HPET
@@ -643,7 +657,7 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
                hpet_pie_count = 0;
        }
 
-       if (hpet_rtc_flags & RTC_PIE &&
+       if (hpet_rtc_flags & RTC_AIE &&
            (curr_time.tm_sec == hpet_alarm_time.tm_sec) &&
            (curr_time.tm_min == hpet_alarm_time.tm_min) &&
            (curr_time.tm_hour == hpet_alarm_time.tm_hour))