diff options
-rw-r--r-- | arch/powerpc/kernel/pci_64.c | 58 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/pci.c | 4 |
2 files changed, 30 insertions, 32 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index c1b1e14775e4..78d3c0fc8dfb 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <asm/byteorder.h> | 30 | #include <asm/byteorder.h> |
31 | #include <asm/machdep.h> | 31 | #include <asm/machdep.h> |
32 | #include <asm/ppc-pci.h> | 32 | #include <asm/ppc-pci.h> |
33 | #include <asm/firmware.h> | ||
33 | 34 | ||
34 | #ifdef DEBUG | 35 | #ifdef DEBUG |
35 | #include <asm/udbg.h> | 36 | #include <asm/udbg.h> |
@@ -209,7 +210,6 @@ void pcibios_free_controller(struct pci_controller *phb) | |||
209 | kfree(phb); | 210 | kfree(phb); |
210 | } | 211 | } |
211 | 212 | ||
212 | #ifndef CONFIG_PPC_ISERIES | ||
213 | void __devinit pcibios_claim_one_bus(struct pci_bus *b) | 213 | void __devinit pcibios_claim_one_bus(struct pci_bus *b) |
214 | { | 214 | { |
215 | struct pci_dev *dev; | 215 | struct pci_dev *dev; |
@@ -238,10 +238,12 @@ static void __init pcibios_claim_of_setup(void) | |||
238 | { | 238 | { |
239 | struct pci_bus *b; | 239 | struct pci_bus *b; |
240 | 240 | ||
241 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | ||
242 | return; | ||
243 | |||
241 | list_for_each_entry(b, &pci_root_buses, node) | 244 | list_for_each_entry(b, &pci_root_buses, node) |
242 | pcibios_claim_one_bus(b); | 245 | pcibios_claim_one_bus(b); |
243 | } | 246 | } |
244 | #endif | ||
245 | 247 | ||
246 | #ifdef CONFIG_PPC_MULTIPLATFORM | 248 | #ifdef CONFIG_PPC_MULTIPLATFORM |
247 | static u32 get_int_prop(struct device_node *np, const char *name, u32 def) | 249 | static u32 get_int_prop(struct device_node *np, const char *name, u32 def) |
@@ -554,9 +556,8 @@ static int __init pcibios_init(void) | |||
554 | */ | 556 | */ |
555 | ppc_md.phys_mem_access_prot = pci_phys_mem_access_prot; | 557 | ppc_md.phys_mem_access_prot = pci_phys_mem_access_prot; |
556 | 558 | ||
557 | #ifdef CONFIG_PPC_ISERIES | 559 | if (firmware_has_feature(FW_FEATURE_ISERIES)) |
558 | iSeries_pcibios_init(); | 560 | iSeries_pcibios_init(); |
559 | #endif | ||
560 | 561 | ||
561 | printk(KERN_DEBUG "PCI: Probing PCI hardware\n"); | 562 | printk(KERN_DEBUG "PCI: Probing PCI hardware\n"); |
562 | 563 | ||
@@ -566,15 +567,15 @@ static int __init pcibios_init(void) | |||
566 | pci_bus_add_devices(hose->bus); | 567 | pci_bus_add_devices(hose->bus); |
567 | } | 568 | } |
568 | 569 | ||
569 | #ifndef CONFIG_PPC_ISERIES | 570 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) { |
570 | if (pci_probe_only) | 571 | if (pci_probe_only) |
571 | pcibios_claim_of_setup(); | 572 | pcibios_claim_of_setup(); |
572 | else | 573 | else |
573 | /* FIXME: `else' will be removed when | 574 | /* FIXME: `else' will be removed when |
574 | pci_assign_unassigned_resources() is able to work | 575 | pci_assign_unassigned_resources() is able to work |
575 | correctly with [partially] allocated PCI tree. */ | 576 | correctly with [partially] allocated PCI tree. */ |
576 | pci_assign_unassigned_resources(); | 577 | pci_assign_unassigned_resources(); |
577 | #endif /* !CONFIG_PPC_ISERIES */ | 578 | } |
578 | 579 | ||
579 | /* Call machine dependent final fixup */ | 580 | /* Call machine dependent final fixup */ |
580 | if (ppc_md.pcibios_fixup) | 581 | if (ppc_md.pcibios_fixup) |
@@ -586,8 +587,9 @@ static int __init pcibios_init(void) | |||
586 | printk(KERN_DEBUG "ISA bridge at %s\n", pci_name(ppc64_isabridge_dev)); | 587 | printk(KERN_DEBUG "ISA bridge at %s\n", pci_name(ppc64_isabridge_dev)); |
587 | 588 | ||
588 | #ifdef CONFIG_PPC_MULTIPLATFORM | 589 | #ifdef CONFIG_PPC_MULTIPLATFORM |
589 | /* map in PCI I/O space */ | 590 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) |
590 | phbs_remap_io(); | 591 | /* map in PCI I/O space */ |
592 | phbs_remap_io(); | ||
591 | #endif | 593 | #endif |
592 | 594 | ||
593 | printk(KERN_DEBUG "PCI: Probing PCI hardware done\n"); | 595 | printk(KERN_DEBUG "PCI: Probing PCI hardware done\n"); |
@@ -637,13 +639,13 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) | |||
637 | */ | 639 | */ |
638 | int pci_domain_nr(struct pci_bus *bus) | 640 | int pci_domain_nr(struct pci_bus *bus) |
639 | { | 641 | { |
640 | #ifdef CONFIG_PPC_ISERIES | 642 | if (firmware_has_feature(FW_FEATURE_ISERIES)) |
641 | return 0; | 643 | return 0; |
642 | #else | 644 | else { |
643 | struct pci_controller *hose = pci_bus_to_host(bus); | 645 | struct pci_controller *hose = pci_bus_to_host(bus); |
644 | 646 | ||
645 | return hose->global_number; | 647 | return hose->global_number; |
646 | #endif | 648 | } |
647 | } | 649 | } |
648 | 650 | ||
649 | EXPORT_SYMBOL(pci_domain_nr); | 651 | EXPORT_SYMBOL(pci_domain_nr); |
@@ -651,12 +653,12 @@ EXPORT_SYMBOL(pci_domain_nr); | |||
651 | /* Decide whether to display the domain number in /proc */ | 653 | /* Decide whether to display the domain number in /proc */ |
652 | int pci_proc_domain(struct pci_bus *bus) | 654 | int pci_proc_domain(struct pci_bus *bus) |
653 | { | 655 | { |
654 | #ifdef CONFIG_PPC_ISERIES | 656 | if (firmware_has_feature(FW_FEATURE_ISERIES)) |
655 | return 0; | 657 | return 0; |
656 | #else | 658 | else { |
657 | struct pci_controller *hose = pci_bus_to_host(bus); | 659 | struct pci_controller *hose = pci_bus_to_host(bus); |
658 | return hose->buid; | 660 | return hose->buid; |
659 | #endif | 661 | } |
660 | } | 662 | } |
661 | 663 | ||
662 | /* | 664 | /* |
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c index 3eb12065df23..e904b3609c6c 100644 --- a/arch/powerpc/platforms/iseries/pci.c +++ b/arch/powerpc/platforms/iseries/pci.c | |||
@@ -262,10 +262,6 @@ void __init iSeries_pci_final_fixup(void) | |||
262 | mf_display_src(0xC9000200); | 262 | mf_display_src(0xC9000200); |
263 | } | 263 | } |
264 | 264 | ||
265 | void pcibios_fixup_bus(struct pci_bus *PciBus) | ||
266 | { | ||
267 | } | ||
268 | |||
269 | void pcibios_fixup_resources(struct pci_dev *pdev) | 265 | void pcibios_fixup_resources(struct pci_dev *pdev) |
270 | { | 266 | { |
271 | } | 267 | } |