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_fire.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_fire.c')
-rw-r--r-- | arch/sparc64/kernel/pci_fire.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/arch/sparc64/kernel/pci_fire.c b/arch/sparc64/kernel/pci_fire.c index 4fb1ef92cb16..1b44153f9077 100644 --- a/arch/sparc64/kernel/pci_fire.c +++ b/arch/sparc64/kernel/pci_fire.c | |||
@@ -33,13 +33,6 @@ | |||
33 | "i" (ASI_PHYS_BYPASS_EC_E) \ | 33 | "i" (ASI_PHYS_BYPASS_EC_E) \ |
34 | : "memory") | 34 | : "memory") |
35 | 35 | ||
36 | static void __init pci_fire_scan_bus(struct pci_pbm_info *pbm) | ||
37 | { | ||
38 | pbm->pci_bus = pci_scan_one_pbm(pbm); | ||
39 | |||
40 | /* XXX register error interrupt handlers XXX */ | ||
41 | } | ||
42 | |||
43 | #define FIRE_IOMMU_CONTROL 0x40000UL | 36 | #define FIRE_IOMMU_CONTROL 0x40000UL |
44 | #define FIRE_IOMMU_TSBBASE 0x40008UL | 37 | #define FIRE_IOMMU_TSBBASE 0x40008UL |
45 | #define FIRE_IOMMU_FLUSH 0x40100UL | 38 | #define FIRE_IOMMU_FLUSH 0x40100UL |
@@ -439,9 +432,10 @@ static void pci_fire_hw_init(struct pci_pbm_info *pbm) | |||
439 | } | 432 | } |
440 | 433 | ||
441 | static int __init pci_fire_pbm_init(struct pci_controller_info *p, | 434 | static int __init pci_fire_pbm_init(struct pci_controller_info *p, |
442 | struct device_node *dp, u32 portid) | 435 | struct of_device *op, u32 portid) |
443 | { | 436 | { |
444 | const struct linux_prom64_registers *regs; | 437 | const struct linux_prom64_registers *regs; |
438 | struct device_node *dp = op->node; | ||
445 | struct pci_pbm_info *pbm; | 439 | struct pci_pbm_info *pbm; |
446 | int err; | 440 | int err; |
447 | 441 | ||
@@ -483,7 +477,9 @@ static int __init pci_fire_pbm_init(struct pci_controller_info *p, | |||
483 | 477 | ||
484 | pci_fire_msi_init(pbm); | 478 | pci_fire_msi_init(pbm); |
485 | 479 | ||
486 | pci_fire_scan_bus(pbm); | 480 | pbm->pci_bus = pci_scan_one_pbm(pbm, &op->dev); |
481 | |||
482 | /* XXX register error interrupt handlers XXX */ | ||
487 | 483 | ||
488 | return 0; | 484 | return 0; |
489 | } | 485 | } |
@@ -508,7 +504,7 @@ static int __devinit fire_probe(struct of_device *op, | |||
508 | portid = of_getintprop_default(dp, "portid", 0xff); | 504 | portid = of_getintprop_default(dp, "portid", 0xff); |
509 | for (pbm = pci_pbm_root; pbm; pbm = pbm->next) { | 505 | for (pbm = pci_pbm_root; pbm; pbm = pbm->next) { |
510 | if (portid_compare(pbm->portid, portid)) | 506 | if (portid_compare(pbm->portid, portid)) |
511 | return pci_fire_pbm_init(pbm->parent, dp, portid); | 507 | return pci_fire_pbm_init(pbm->parent, op, portid); |
512 | } | 508 | } |
513 | 509 | ||
514 | err = -ENOMEM; | 510 | err = -ENOMEM; |
@@ -534,7 +530,7 @@ static int __devinit fire_probe(struct of_device *op, | |||
534 | 530 | ||
535 | p->pbm_B.iommu = iommu; | 531 | p->pbm_B.iommu = iommu; |
536 | 532 | ||
537 | return pci_fire_pbm_init(p, dp, portid); | 533 | return pci_fire_pbm_init(p, op, portid); |
538 | 534 | ||
539 | out_free_iommu_A: | 535 | out_free_iommu_A: |
540 | kfree(p->pbm_A.iommu); | 536 | kfree(p->pbm_A.iommu); |