diff options
author | Daniel Axtens <dja@axtens.net> | 2015-03-31 01:00:40 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-04-11 06:49:10 -0400 |
commit | ba9c8f227358bcbc80fca19e7a339883cbc956a5 (patch) | |
tree | fe28a8cc565f878dcd80618cd957f6665fde385d /arch/powerpc/platforms | |
parent | bdc728a849a7047e55014c6f968aa300cc9f57fa (diff) |
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')
-rw-r--r-- | arch/powerpc/platforms/powermac/pci.c | 17 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/pmac.h | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/setup.c | 18 |
3 files changed, 21 insertions, 18 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) | |||
1223 | pci_write_config_dword(dev, PCI_PREF_MEMORY_BASE, 0); | 1223 | pci_write_config_dword(dev, PCI_PREF_MEMORY_BASE, 0); |
1224 | } | 1224 | } |
1225 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_U4_PCIE, fixup_u4_pcie); | 1225 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_U4_PCIE, fixup_u4_pcie); |
1226 | |||
1227 | #ifdef CONFIG_PPC64 | ||
1228 | int pmac_pci_probe_mode(struct pci_bus *bus) | ||
1229 | { | ||
1230 | struct device_node *node = pci_bus_to_OF_node(bus); | ||
1231 | |||
1232 | /* We need to use normal PCI probing for the AGP bus, | ||
1233 | * since the device for the AGP bridge isn't in the tree. | ||
1234 | * Same for the PCIe host on U4 and the HT host bridge. | ||
1235 | */ | ||
1236 | if (bus->self == NULL && (of_device_is_compatible(node, "u3-agp") || | ||
1237 | of_device_is_compatible(node, "u4-pcie") || | ||
1238 | of_device_is_compatible(node, "u3-ht"))) | ||
1239 | return PCI_PROBE_NORMAL; | ||
1240 | return PCI_PROBE_DEVTREE; | ||
1241 | } | ||
1242 | #endif /* CONFIG_PPC64 */ | ||
diff --git a/arch/powerpc/platforms/powermac/pmac.h b/arch/powerpc/platforms/powermac/pmac.h index 8327cce2bdb0..46d219345537 100644 --- a/arch/powerpc/platforms/powermac/pmac.h +++ b/arch/powerpc/platforms/powermac/pmac.h | |||
@@ -39,4 +39,8 @@ extern void low_cpu_die(void) __attribute__((noreturn)); | |||
39 | extern int pmac_nvram_init(void); | 39 | extern int pmac_nvram_init(void); |
40 | extern void pmac_pic_init(void); | 40 | extern void pmac_pic_init(void); |
41 | 41 | ||
42 | #ifdef CONFIG_PPC64 | ||
43 | extern int pmac_pci_probe_mode(struct pci_bus *bus); | ||
44 | #endif | ||
45 | |||
42 | #endif /* __PMAC_H__ */ | 46 | #endif /* __PMAC_H__ */ |
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 713d36d45d1d..efe172db5f8e 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -637,24 +637,6 @@ static int __init pmac_probe(void) | |||
637 | return 1; | 637 | return 1; |
638 | } | 638 | } |
639 | 639 | ||
640 | #ifdef CONFIG_PPC64 | ||
641 | /* Move that to pci.c */ | ||
642 | static int pmac_pci_probe_mode(struct pci_bus *bus) | ||
643 | { | ||
644 | struct device_node *node = pci_bus_to_OF_node(bus); | ||
645 | |||
646 | /* We need to use normal PCI probing for the AGP bus, | ||
647 | * since the device for the AGP bridge isn't in the tree. | ||
648 | * Same for the PCIe host on U4 and the HT host bridge. | ||
649 | */ | ||
650 | if (bus->self == NULL && (of_device_is_compatible(node, "u3-agp") || | ||
651 | of_device_is_compatible(node, "u4-pcie") || | ||
652 | of_device_is_compatible(node, "u3-ht"))) | ||
653 | return PCI_PROBE_NORMAL; | ||
654 | return PCI_PROBE_DEVTREE; | ||
655 | } | ||
656 | #endif /* CONFIG_PPC64 */ | ||
657 | |||
658 | define_machine(powermac) { | 640 | define_machine(powermac) { |
659 | .name = "PowerMac", | 641 | .name = "PowerMac", |
660 | .probe = pmac_probe, | 642 | .probe = pmac_probe, |