diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-01 21:32:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-01 21:32:22 -0400 |
commit | e822358ac24550d889895d5866797ae8c9b188c2 (patch) | |
tree | ad231109cba4725ea349fd7186bf6dc293cf3045 /arch/sparc64/kernel/pci_sun4v.c | |
parent | 7cc288add44c392dfc8c1dbf0e3a26a69a14fa70 (diff) |
sparc64: Pass proper parent device down into root pci_create_bus() call.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/pci_sun4v.c')
-rw-r--r-- | arch/sparc64/kernel/pci_sun4v.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c index 21864f065323..4839c503c88d 100644 --- a/arch/sparc64/kernel/pci_sun4v.c +++ b/arch/sparc64/kernel/pci_sun4v.c | |||
@@ -543,7 +543,8 @@ static const struct dma_ops sun4v_dma_ops = { | |||
543 | .sync_sg_for_cpu = dma_4v_sync_sg_for_cpu, | 543 | .sync_sg_for_cpu = dma_4v_sync_sg_for_cpu, |
544 | }; | 544 | }; |
545 | 545 | ||
546 | static void __init pci_sun4v_scan_bus(struct pci_pbm_info *pbm) | 546 | static void __init pci_sun4v_scan_bus(struct pci_pbm_info *pbm, |
547 | struct device *parent) | ||
547 | { | 548 | { |
548 | struct property *prop; | 549 | struct property *prop; |
549 | struct device_node *dp; | 550 | struct device_node *dp; |
@@ -551,7 +552,7 @@ static void __init pci_sun4v_scan_bus(struct pci_pbm_info *pbm) | |||
551 | dp = pbm->prom_node; | 552 | dp = pbm->prom_node; |
552 | prop = of_find_property(dp, "66mhz-capable", NULL); | 553 | prop = of_find_property(dp, "66mhz-capable", NULL); |
553 | pbm->is_66mhz_capable = (prop != NULL); | 554 | pbm->is_66mhz_capable = (prop != NULL); |
554 | pbm->pci_bus = pci_scan_one_pbm(pbm); | 555 | pbm->pci_bus = pci_scan_one_pbm(pbm, parent); |
555 | 556 | ||
556 | /* XXX register error interrupt handlers XXX */ | 557 | /* XXX register error interrupt handlers XXX */ |
557 | } | 558 | } |
@@ -894,8 +895,9 @@ static void pci_sun4v_msi_init(struct pci_pbm_info *pbm) | |||
894 | #endif /* !(CONFIG_PCI_MSI) */ | 895 | #endif /* !(CONFIG_PCI_MSI) */ |
895 | 896 | ||
896 | static int __init pci_sun4v_pbm_init(struct pci_controller_info *p, | 897 | static int __init pci_sun4v_pbm_init(struct pci_controller_info *p, |
897 | struct device_node *dp, u32 devhandle) | 898 | struct of_device *op, u32 devhandle) |
898 | { | 899 | { |
900 | struct device_node *dp = op->node; | ||
899 | struct pci_pbm_info *pbm; | 901 | struct pci_pbm_info *pbm; |
900 | int err; | 902 | int err; |
901 | 903 | ||
@@ -934,7 +936,7 @@ static int __init pci_sun4v_pbm_init(struct pci_controller_info *p, | |||
934 | 936 | ||
935 | pci_sun4v_msi_init(pbm); | 937 | pci_sun4v_msi_init(pbm); |
936 | 938 | ||
937 | pci_sun4v_scan_bus(pbm); | 939 | pci_sun4v_scan_bus(pbm, &op->dev); |
938 | 940 | ||
939 | return 0; | 941 | return 0; |
940 | } | 942 | } |
@@ -979,7 +981,7 @@ static int __devinit pci_sun4v_probe(struct of_device *op, | |||
979 | 981 | ||
980 | for (pbm = pci_pbm_root; pbm; pbm = pbm->next) { | 982 | for (pbm = pci_pbm_root; pbm; pbm = pbm->next) { |
981 | if (pbm->devhandle == (devhandle ^ 0x40)) { | 983 | if (pbm->devhandle == (devhandle ^ 0x40)) { |
982 | return pci_sun4v_pbm_init(pbm->parent, dp, devhandle); | 984 | return pci_sun4v_pbm_init(pbm->parent, op, devhandle); |
983 | } | 985 | } |
984 | } | 986 | } |
985 | 987 | ||
@@ -1015,7 +1017,7 @@ static int __devinit pci_sun4v_probe(struct of_device *op, | |||
1015 | 1017 | ||
1016 | p->pbm_B.iommu = iommu; | 1018 | p->pbm_B.iommu = iommu; |
1017 | 1019 | ||
1018 | return pci_sun4v_pbm_init(p, dp, devhandle); | 1020 | return pci_sun4v_pbm_init(p, op, devhandle); |
1019 | 1021 | ||
1020 | out_free_iommu_A: | 1022 | out_free_iommu_A: |
1021 | kfree(p->pbm_A.iommu); | 1023 | kfree(p->pbm_A.iommu); |