diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/hpet.c | 14 | ||||
-rw-r--r-- | arch/x86/kernel/reboot_32.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/reboot_64.c | 4 |
3 files changed, 22 insertions, 0 deletions
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 53303f2e5475..4a86ffd67ec5 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c @@ -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 diff --git a/arch/x86/kernel/reboot_32.c b/arch/x86/kernel/reboot_32.c index 9e2269d00918..bb1a0f889c5e 100644 --- a/arch/x86/kernel/reboot_32.c +++ b/arch/x86/kernel/reboot_32.c @@ -11,6 +11,7 @@ #include <linux/reboot.h> #include <asm/uaccess.h> #include <asm/apic.h> +#include <asm/hpet.h> #include <asm/desc.h> #include "mach_reboot.h" #include <asm/reboot_fixups.h> @@ -326,6 +327,9 @@ static void native_machine_shutdown(void) #ifdef CONFIG_X86_IO_APIC disable_IO_APIC(); #endif +#ifdef CONFIG_HPET_TIMER + hpet_disable(); +#endif } void __attribute__((weak)) mach_reboot_fixups(void) diff --git a/arch/x86/kernel/reboot_64.c b/arch/x86/kernel/reboot_64.c index 71b13c5f5817..53620a92a8fd 100644 --- a/arch/x86/kernel/reboot_64.c +++ b/arch/x86/kernel/reboot_64.c @@ -17,6 +17,7 @@ #include <asm/pgtable.h> #include <asm/tlbflush.h> #include <asm/apic.h> +#include <asm/hpet.h> #include <asm/gart.h> /* @@ -113,6 +114,9 @@ void machine_shutdown(void) disable_IO_APIC(); +#ifdef CONFIG_HPET_TIMER + hpet_disable(); +#endif local_irq_restore(flags); pci_iommu_shutdown(); |