Pull bugzilla-9345 into release branch
[sfrench/cifs-2.6.git] / arch / x86 / kernel / hpet.c
index 53303f2e547582e282f5a941cc2311b79a821238..4a86ffd67ec5e23ecec8c9ed42d9f00ecc051631 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