diff options
Diffstat (limited to 'drivers/pci/quirks.c')
-rw-r--r-- | drivers/pci/quirks.c | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 9e23912c97ac..bd80f6378463 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -554,18 +554,30 @@ static void __devinit quirk_ich4_lpc_acpi(struct pci_dev *dev) | |||
554 | u32 region; | 554 | u32 region; |
555 | u8 enable; | 555 | u8 enable; |
556 | 556 | ||
557 | /* | ||
558 | * The check for PCIBIOS_MIN_IO is to ensure we won't create a conflict | ||
559 | * with low legacy (and fixed) ports. We don't know the decoding | ||
560 | * priority and can't tell whether the legacy device or the one created | ||
561 | * here is really at that address. This happens on boards with broken | ||
562 | * BIOSes. | ||
563 | */ | ||
564 | |||
557 | pci_read_config_byte(dev, ICH_ACPI_CNTL, &enable); | 565 | pci_read_config_byte(dev, ICH_ACPI_CNTL, &enable); |
558 | if (enable & ICH4_ACPI_EN) { | 566 | if (enable & ICH4_ACPI_EN) { |
559 | pci_read_config_dword(dev, ICH_PMBASE, ®ion); | 567 | pci_read_config_dword(dev, ICH_PMBASE, ®ion); |
560 | quirk_io_region(dev, region, 128, PCI_BRIDGE_RESOURCES, | 568 | region &= PCI_BASE_ADDRESS_IO_MASK; |
561 | "ICH4 ACPI/GPIO/TCO"); | 569 | if (region >= PCIBIOS_MIN_IO) |
570 | quirk_io_region(dev, region, 128, PCI_BRIDGE_RESOURCES, | ||
571 | "ICH4 ACPI/GPIO/TCO"); | ||
562 | } | 572 | } |
563 | 573 | ||
564 | pci_read_config_byte(dev, ICH4_GPIO_CNTL, &enable); | 574 | pci_read_config_byte(dev, ICH4_GPIO_CNTL, &enable); |
565 | if (enable & ICH4_GPIO_EN) { | 575 | if (enable & ICH4_GPIO_EN) { |
566 | pci_read_config_dword(dev, ICH4_GPIOBASE, ®ion); | 576 | pci_read_config_dword(dev, ICH4_GPIOBASE, ®ion); |
567 | quirk_io_region(dev, region, 64, PCI_BRIDGE_RESOURCES + 1, | 577 | region &= PCI_BASE_ADDRESS_IO_MASK; |
568 | "ICH4 GPIO"); | 578 | if (region >= PCIBIOS_MIN_IO) |
579 | quirk_io_region(dev, region, 64, | ||
580 | PCI_BRIDGE_RESOURCES + 1, "ICH4 GPIO"); | ||
569 | } | 581 | } |
570 | } | 582 | } |
571 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_0, quirk_ich4_lpc_acpi); | 583 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_0, quirk_ich4_lpc_acpi); |
@@ -587,15 +599,19 @@ static void __devinit ich6_lpc_acpi_gpio(struct pci_dev *dev) | |||
587 | pci_read_config_byte(dev, ICH_ACPI_CNTL, &enable); | 599 | pci_read_config_byte(dev, ICH_ACPI_CNTL, &enable); |
588 | if (enable & ICH6_ACPI_EN) { | 600 | if (enable & ICH6_ACPI_EN) { |
589 | pci_read_config_dword(dev, ICH_PMBASE, ®ion); | 601 | pci_read_config_dword(dev, ICH_PMBASE, ®ion); |
590 | quirk_io_region(dev, region, 128, PCI_BRIDGE_RESOURCES, | 602 | region &= PCI_BASE_ADDRESS_IO_MASK; |
591 | "ICH6 ACPI/GPIO/TCO"); | 603 | if (region >= PCIBIOS_MIN_IO) |
604 | quirk_io_region(dev, region, 128, PCI_BRIDGE_RESOURCES, | ||
605 | "ICH6 ACPI/GPIO/TCO"); | ||
592 | } | 606 | } |
593 | 607 | ||
594 | pci_read_config_byte(dev, ICH6_GPIO_CNTL, &enable); | 608 | pci_read_config_byte(dev, ICH6_GPIO_CNTL, &enable); |
595 | if (enable & ICH4_GPIO_EN) { | 609 | if (enable & ICH4_GPIO_EN) { |
596 | pci_read_config_dword(dev, ICH6_GPIOBASE, ®ion); | 610 | pci_read_config_dword(dev, ICH6_GPIOBASE, ®ion); |
597 | quirk_io_region(dev, region, 64, PCI_BRIDGE_RESOURCES + 1, | 611 | region &= PCI_BASE_ADDRESS_IO_MASK; |
598 | "ICH6 GPIO"); | 612 | if (region >= PCIBIOS_MIN_IO) |
613 | quirk_io_region(dev, region, 64, | ||
614 | PCI_BRIDGE_RESOURCES + 1, "ICH6 GPIO"); | ||
599 | } | 615 | } |
600 | } | 616 | } |
601 | 617 | ||