[PATCH] x86: HPET force enable for Soekris net6501

Conrad Kostecki
2014-02-14T10:38:47Z

Hello,
as the Soekris net6501 does not have any ACPI implementation, HPET won't get enabled.
This patch enables HPET on such platforms.

[ 0.430149] pci 0000:00:01.0: Force enabled HPET at 0xfed00000
[ 0.644838] HPET: 3 timers in total, 0 timers will be used for per-cpu timer

Original patch by Peter Neubauer, slightly modified by me.
-> http://www.mail-archive.com/soekris-tech@lists.soekris.com/msg06462.html

Cheers
Conrad

Signed-off-by: Peter Neubauer <pneubauer@bluerwhite.org>
Signed-off-by: Conrad Kostecki <ck@conrad-kostecki.de>

--- a/arch/x86/kernel/quirks.c 2014-02-14 11:13:27.703432732 +0100
+++ b/arch/x86/kernel/quirks.c 2014-02-14 11:14:32.327496474 +0100
@@ -498,6 +498,25 @@ void force_hpet_resume(void)
}

/*
+ * Soekris net6501, based on Atom E6xx series, does not have ACPI.
+ * HPET should be force enabled on such platforms.
+ */
+static void e6xx_force_enable_hpet(struct pci_dev *dev)
+{
+ if (hpet_address || force_hpet_address)
+ return;
+
+ force_hpet_address = 0xFED00000;
+ force_hpet_resume_type = NONE_FORCE_HPET_RESUME;
+ dev_printk(KERN_DEBUG, &dev->dev, "Force enabled HPET at "
+ "0x%lx\n", force_hpet_address);
+ return;
+}
+
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E6XX_CU,
+ e6xx_force_enable_hpet);
+
+/*
* HPET MSI on some boards (ATI SB700/SB800) has side effect on
* floppy DMA. Disable HPET MSI on such platforms.
* See erratum #27 (Misinterpreted MSI Requests May Result in
--- a/include/linux/pci_ids.h 2014-02-14 11:13:00.575408953 +0100
+++ b/include/linux/pci_ids.h 2014-02-14 11:13:37.819442066 +0100
@@ -2854,6 +2854,7 @@
#define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601
#define PCI_DEVICE_ID_INTEL_SCH_LPC 0x8119
#define PCI_DEVICE_ID_INTEL_SCH_IDE 0x811a
+#define PCI_DEVICE_ID_INTEL_E6XX_CU 0x8183
#define PCI_DEVICE_ID_INTEL_ITC_LPC 0x8186
#define PCI_DEVICE_ID_INTEL_82454GX 0x84c4
#define PCI_DEVICE_ID_INTEL_82450GX 0x84c5