[PATCH] PCI: quirk for IBM Dock II cardbus controllers
authorKristen Accardi <kristen.c.accardi@intel.com>
Wed, 18 Jan 2006 00:57:04 +0000 (16:57 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 23 Mar 2006 22:35:10 +0000 (14:35 -0800)
The IBM Dock II cardbus bridges require some extra configuration
before Yenta is loaded in order to setup the Interrupts to be
routed properly.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/quirks.c

index dda6099903c18adc8636d89683ddc02a9a17b32a..7ec9fc9a9a4278c0219ca82f841f5606c54718f3 100644 (file)
@@ -1242,6 +1242,33 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,     PCI_DEVICE_ID_INTEL_PXH_1,      quirk_pc
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHV,       quirk_pcie_pxh);
 
 
+/*
+ * Fixup the cardbus bridges on the IBM Dock II docking station
+ */
+static void __devinit quirk_ibm_dock2_cardbus(struct pci_dev *dev)
+{
+       u32 val;
+
+       /*
+        * tie the 2 interrupt pins to INTA, and configure the
+        * multifunction routing register to handle this.
+        */
+       if ((dev->subsystem_vendor == PCI_VENDOR_ID_IBM) &&
+               (dev->subsystem_device == 0x0148)) {
+               printk(KERN_INFO "PCI: Found IBM Dock II Cardbus Bridge "
+                       "applying quirk\n");
+               pci_read_config_dword(dev, 0x8c, &val);
+               val = ((val & 0xffffff00) | 0x1002);
+               pci_write_config_dword(dev, 0x8c, val);
+               pci_read_config_dword(dev, 0x80, &val);
+               val = ((val & 0x00ffff00) | 0x2864c077);
+               pci_write_config_dword(dev, 0x80, val);
+       }
+}
+
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1420,
+                               quirk_ibm_dock2_cardbus);
+
 static void __devinit quirk_netmos(struct pci_dev *dev)
 {
        unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4;