[patch] VIA VT8235 PCI quirk

From: Ivan Kokshaysky
Date: Mon Aug 08 2005 - 03:56:32 EST


Like many other southbridges from different manufacturers, VIA VT8235
chip has two non-standard BARs for power management and SMBus
registers (see the datasheet at http://www.via.com.tw).
This new quirk routine fixes boot problem with 2.6.13-rc2/rc6 kernels
on Targa Visionary 811 Athlon64 laptop, as reported by
Mikael Pettersson <mikpe@xxxxxxxxx>.

Signed-off-by: Ivan Kokshaysky <ink@xxxxxxxxxxxxxxxxxxxx>

--- 2.6.13-rc6/drivers/pci/quirks.c Sun Aug 7 12:07:40 2005
+++ linux/drivers/pci/quirks.c Sun Aug 7 14:37:14 2005
@@ -373,6 +373,25 @@ static void __devinit quirk_vt82c686_acp
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_vt82c686_acpi );

+/*
+ * VIA VT8235 ISA Bridge: Two IO regions pointed to by words at
+ * 0x88 (128 bytes of power management registers)
+ * 0xd0 (16 bytes of SMB registers)
+ */
+static void __devinit quirk_vt8235_acpi(struct pci_dev *dev)
+{
+ u16 pm, smb;
+
+ pci_read_config_word(dev, 0x88, &pm);
+ pm &= PCI_BASE_ADDRESS_IO_MASK;
+ quirk_io_region(dev, pm, 128, PCI_BRIDGE_RESOURCES);
+
+ pci_read_config_word(dev, 0xd0, &smb);
+ smb &= PCI_BASE_ADDRESS_IO_MASK;
+ quirk_io_region(dev, smb, 16, PCI_BRIDGE_RESOURCES + 1);
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, quirk_vt8235_acpi);
+

#ifdef CONFIG_X86_IO_APIC

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/