diff options
author | Daniel Axtens <dja@axtens.net> | 2015-03-31 16:00:40 +1100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-04-11 20:49:10 +1000 |
commit | ba9c8f227358bcbc80fca19e7a339883cbc956a5 (patch) | |
tree | fe28a8cc565f878dcd80618cd957f6665fde385d /arch/powerpc/platforms/powermac/pci.c | |
parent | bdc728a849a7047e55014c6f968aa300cc9f57fa (diff) | |
download | linux-ba9c8f227358bcbc80fca19e7a339883cbc956a5.tar.gz linux-ba9c8f227358bcbc80fca19e7a339883cbc956a5.tar.bz2 linux-ba9c8f227358bcbc80fca19e7a339883cbc956a5.zip |
powerpc/powermac: move pmac_pci_probe_mode from setup.c to pci.c
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/powermac/pci.c')
-rw-r--r-- | arch/powerpc/platforms/powermac/pci.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c index f4071a67ad00..a792f4552442 100644 --- a/arch/powerpc/platforms/powermac/pci.c +++ b/arch/powerpc/platforms/powermac/pci.c @@ -1223,3 +1223,20 @@ static void fixup_u4_pcie(struct pci_dev* dev) pci_write_config_dword(dev, PCI_PREF_MEMORY_BASE, 0); } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_U4_PCIE, fixup_u4_pcie); + +#ifdef CONFIG_PPC64 +int pmac_pci_probe_mode(struct pci_bus *bus) +{ + struct device_node *node = pci_bus_to_OF_node(bus); + + /* We need to use normal PCI probing for the AGP bus, + * since the device for the AGP bridge isn't in the tree. + * Same for the PCIe host on U4 and the HT host bridge. + */ + if (bus->self == NULL && (of_device_is_compatible(node, "u3-agp") || + of_device_is_compatible(node, "u4-pcie") || + of_device_is_compatible(node, "u3-ht"))) + return PCI_PROBE_NORMAL; + return PCI_PROBE_DEVTREE; +} +#endif /* CONFIG_PPC64 */ |