aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc64/kernel/pci_schizo.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-09-01 18:32:22 -0700
committerDavid S. Miller <davem@davemloft.net>2008-09-01 18:32:22 -0700
commite822358ac24550d889895d5866797ae8c9b188c2 (patch)
treead231109cba4725ea349fd7186bf6dc293cf3045 /arch/sparc64/kernel/pci_schizo.c
parent7cc288add44c392dfc8c1dbf0e3a26a69a14fa70 (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_schizo.c')
-rw-r--r--arch/sparc64/kernel/pci_schizo.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c
index bd7612aae17..64904b180f4 100644
--- a/arch/sparc64/kernel/pci_schizo.c
+++ b/arch/sparc64/kernel/pci_schizo.c
@@ -1085,14 +1085,15 @@ static void pbm_config_busmastering(struct pci_pbm_info *pbm)
pci_config_write8(addr, 64);
}
-static void __devinit schizo_scan_bus(struct pci_pbm_info *pbm)
+static void __devinit schizo_scan_bus(struct pci_pbm_info *pbm,
+ struct device *parent)
{
pbm_config_busmastering(pbm);
pbm->is_66mhz_capable =
(of_find_property(pbm->prom_node, "66mhz-capable", NULL)
!= NULL);
- pbm->pci_bus = pci_scan_one_pbm(pbm);
+ pbm->pci_bus = pci_scan_one_pbm(pbm, parent);
if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO)
tomatillo_register_error_handlers(pbm);
@@ -1338,10 +1339,11 @@ static void schizo_pbm_hw_init(struct pci_pbm_info *pbm)
}
static int __devinit schizo_pbm_init(struct pci_controller_info *p,
- struct device_node *dp, u32 portid,
+ struct of_device *op, u32 portid,
int chip_type)
{
const struct linux_prom64_registers *regs;
+ struct device_node *dp = op->node;
struct pci_pbm_info *pbm;
const char *chipset_name;
int is_pbm_a, err;
@@ -1422,7 +1424,7 @@ static int __devinit schizo_pbm_init(struct pci_controller_info *p,
schizo_pbm_strbuf_init(pbm);
- schizo_scan_bus(pbm);
+ schizo_scan_bus(pbm, &op->dev);
return 0;
}
@@ -1437,8 +1439,9 @@ static inline int portid_compare(u32 x, u32 y, int chip_type)
return (x == y);
}
-static int __devinit __schizo_init(struct device_node *dp, unsigned long chip_type)
+static int __devinit __schizo_init(struct of_device *op, unsigned long chip_type)
{
+ struct device_node *dp = op->node;
struct pci_controller_info *p;
struct pci_pbm_info *pbm;
struct iommu *iommu;
@@ -1450,7 +1453,7 @@ static int __devinit __schizo_init(struct device_node *dp, unsigned long chip_ty
err = -ENOMEM;
for (pbm = pci_pbm_root; pbm; pbm = pbm->next) {
if (portid_compare(pbm->portid, portid, chip_type)) {
- if (schizo_pbm_init(pbm->parent, dp,
+ if (schizo_pbm_init(pbm->parent, op,
portid, chip_type))
goto out_err;
return 0;
@@ -1479,7 +1482,7 @@ static int __devinit __schizo_init(struct device_node *dp, unsigned long chip_ty
p->pbm_B.iommu = iommu;
- if (schizo_pbm_init(p, dp, portid, chip_type))
+ if (schizo_pbm_init(p, op, portid, chip_type))
goto out_free_iommu_B;
return 0;
@@ -1500,7 +1503,7 @@ out_err:
static int __devinit schizo_probe(struct of_device *op,
const struct of_device_id *match)
{
- return __schizo_init(op->node, (unsigned long) match->data);
+ return __schizo_init(op, (unsigned long) match->data);
}
/* The ordering of this table is very important. Some Tomatillo