aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/quirks.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/quirks.c')
-rw-r--r--drivers/pci/quirks.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index f28ebdd3958a..605f0df0bfba 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1342,6 +1342,32 @@ void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev)
1342 pci_do_fixups(dev, start, end); 1342 pci_do_fixups(dev, start, end);
1343} 1343}
1344 1344
1345/* Enable 1k I/O space granularity on the Intel P64H2 */
1346static void __devinit quirk_p64h2_1k_io(struct pci_dev *dev)
1347{
1348 u16 en1k;
1349 u8 io_base_lo, io_limit_lo;
1350 unsigned long base, limit;
1351 struct resource *res = dev->resource + PCI_BRIDGE_RESOURCES;
1352
1353 pci_read_config_word(dev, 0x40, &en1k);
1354
1355 if (en1k & 0x200) {
1356 printk(KERN_INFO "PCI: Enable I/O Space to 1 KB Granularity\n");
1357
1358 pci_read_config_byte(dev, PCI_IO_BASE, &io_base_lo);
1359 pci_read_config_byte(dev, PCI_IO_LIMIT, &io_limit_lo);
1360 base = (io_base_lo & (PCI_IO_RANGE_MASK | 0x0c)) << 8;
1361 limit = (io_limit_lo & (PCI_IO_RANGE_MASK | 0x0c)) << 8;
1362
1363 if (base <= limit) {
1364 res->start = base;
1365 res->end = limit + 0x3ff;
1366 }
1367 }
1368}
1369DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1460, quirk_p64h2_1k_io);
1370
1345EXPORT_SYMBOL(pcie_mch_quirk); 1371EXPORT_SYMBOL(pcie_mch_quirk);
1346#ifdef CONFIG_HOTPLUG 1372#ifdef CONFIG_HOTPLUG
1347EXPORT_SYMBOL(pci_fixup_device); 1373EXPORT_SYMBOL(pci_fixup_device);