diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/powermac/pci.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c index 5cc83851ad06..31a7d3a7ce25 100644 --- a/arch/powerpc/platforms/powermac/pci.c +++ b/arch/powerpc/platforms/powermac/pci.c | |||
@@ -561,6 +561,20 @@ static struct pci_ops u4_pcie_pci_ops = | |||
561 | .write = u4_pcie_write_config, | 561 | .write = u4_pcie_write_config, |
562 | }; | 562 | }; |
563 | 563 | ||
564 | static void __devinit pmac_pci_fixup_u4_of_node(struct pci_dev *dev) | ||
565 | { | ||
566 | /* Apple's device-tree "hides" the root complex virtual P2P bridge | ||
567 | * on U4. However, Linux sees it, causing the PCI <-> OF matching | ||
568 | * code to fail to properly match devices below it. This works around | ||
569 | * it by setting the node of the bridge to point to the PHB node, | ||
570 | * which is not entirely correct but fixes the matching code and | ||
571 | * doesn't break anything else. It's also the simplest possible fix. | ||
572 | */ | ||
573 | if (dev->dev.of_node == NULL) | ||
574 | dev->dev.of_node = pcibios_get_phb_of_node(dev->bus); | ||
575 | } | ||
576 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_APPLE, 0x5b, pmac_pci_fixup_u4_of_node); | ||
577 | |||
564 | #endif /* CONFIG_PPC64 */ | 578 | #endif /* CONFIG_PPC64 */ |
565 | 579 | ||
566 | #ifdef CONFIG_PPC32 | 580 | #ifdef CONFIG_PPC32 |