aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/fsl_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev/fsl_pci.c')
-rw-r--r--arch/powerpc/sysdev/fsl_pci.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 92a5915b1827..682084dba19b 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -421,13 +421,16 @@ void fsl_pcibios_fixup_bus(struct pci_bus *bus)
421 } 421 }
422} 422}
423 423
424int __init fsl_add_bridge(struct device_node *dev, int is_primary) 424int __init fsl_add_bridge(struct platform_device *pdev, int is_primary)
425{ 425{
426 int len; 426 int len;
427 struct pci_controller *hose; 427 struct pci_controller *hose;
428 struct resource rsrc; 428 struct resource rsrc;
429 const int *bus_range; 429 const int *bus_range;
430 u8 hdr_type, progif; 430 u8 hdr_type, progif;
431 struct device_node *dev;
432
433 dev = pdev->dev.of_node;
431 434
432 if (!of_device_is_available(dev)) { 435 if (!of_device_is_available(dev)) {
433 pr_warning("%s: disabled\n", dev->full_name); 436 pr_warning("%s: disabled\n", dev->full_name);
@@ -453,6 +456,8 @@ int __init fsl_add_bridge(struct device_node *dev, int is_primary)
453 if (!hose) 456 if (!hose)
454 return -ENOMEM; 457 return -ENOMEM;
455 458
459 /* set platform device as the parent */
460 hose->parent = &pdev->dev;
456 hose->first_busno = bus_range ? bus_range[0] : 0x0; 461 hose->first_busno = bus_range ? bus_range[0] : 0x0;
457 hose->last_busno = bus_range ? bus_range[1] : 0xff; 462 hose->last_busno = bus_range ? bus_range[1] : 0xff;
458 463
@@ -827,13 +832,18 @@ static const struct of_device_id pci_ids[] = {
827 { .compatible = "fsl,mpc8548-pcie", }, 832 { .compatible = "fsl,mpc8548-pcie", },
828 { .compatible = "fsl,mpc8610-pci", }, 833 { .compatible = "fsl,mpc8610-pci", },
829 { .compatible = "fsl,mpc8641-pcie", }, 834 { .compatible = "fsl,mpc8641-pcie", },
835 { .compatible = "fsl,qoriq-pcie-v2.1", },
836 { .compatible = "fsl,qoriq-pcie-v2.2", },
837 { .compatible = "fsl,qoriq-pcie-v2.3", },
838 { .compatible = "fsl,qoriq-pcie-v2.4", },
839
840 /*
841 * The following entries are for compatibility with older device
842 * trees.
843 */
830 { .compatible = "fsl,p1022-pcie", }, 844 { .compatible = "fsl,p1022-pcie", },
831 { .compatible = "fsl,p1010-pcie", },
832 { .compatible = "fsl,p1023-pcie", },
833 { .compatible = "fsl,p4080-pcie", }, 845 { .compatible = "fsl,p4080-pcie", },
834 { .compatible = "fsl,qoriq-pcie-v2.4", }, 846
835 { .compatible = "fsl,qoriq-pcie-v2.3", },
836 { .compatible = "fsl,qoriq-pcie-v2.2", },
837 {}, 847 {},
838}; 848};
839 849
@@ -880,7 +890,7 @@ static int fsl_pci_probe(struct platform_device *pdev)
880#endif 890#endif
881 891
882 node = pdev->dev.of_node; 892 node = pdev->dev.of_node;
883 ret = fsl_add_bridge(node, fsl_pci_primary == node); 893 ret = fsl_add_bridge(pdev, fsl_pci_primary == node);
884 894
885#ifdef CONFIG_SWIOTLB 895#ifdef CONFIG_SWIOTLB
886 if (ret == 0) { 896 if (ret == 0) {