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_schizo.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_schizo.c')
-rw-r--r-- | arch/sparc64/kernel/pci_schizo.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c index bd7612aae17e..64904b180f49 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) | |||
1085 | pci_config_write8(addr, 64); | 1085 | pci_config_write8(addr, 64); |
1086 | } | 1086 | } |
1087 | 1087 | ||
1088 | static void __devinit schizo_scan_bus(struct pci_pbm_info *pbm) | 1088 | static void __devinit schizo_scan_bus(struct pci_pbm_info *pbm, |
1089 | struct device *parent) | ||
1089 | { | 1090 | { |
1090 | pbm_config_busmastering(pbm); | 1091 | pbm_config_busmastering(pbm); |
1091 | pbm->is_66mhz_capable = | 1092 | pbm->is_66mhz_capable = |
1092 | (of_find_property(pbm->prom_node, "66mhz-capable", NULL) | 1093 | (of_find_property(pbm->prom_node, "66mhz-capable", NULL) |
1093 | != NULL); | 1094 | != NULL); |
1094 | 1095 | ||
1095 | pbm->pci_bus = pci_scan_one_pbm(pbm); | 1096 | pbm->pci_bus = pci_scan_one_pbm(pbm, parent); |
1096 | 1097 | ||
1097 | if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO) | 1098 | if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO) |
1098 | tomatillo_register_error_handlers(pbm); | 1099 | tomatillo_register_error_handlers(pbm); |
@@ -1338,10 +1339,11 @@ static void schizo_pbm_hw_init(struct pci_pbm_info *pbm) | |||
1338 | } | 1339 | } |
1339 | 1340 | ||
1340 | static int __devinit schizo_pbm_init(struct pci_controller_info *p, | 1341 | static int __devinit schizo_pbm_init(struct pci_controller_info *p, |
1341 | struct device_node *dp, u32 portid, | 1342 | struct of_device *op, u32 portid, |
1342 | int chip_type) | 1343 | int chip_type) |
1343 | { | 1344 | { |
1344 | const struct linux_prom64_registers *regs; | 1345 | const struct linux_prom64_registers *regs; |
1346 | struct device_node *dp = op->node; | ||
1345 | struct pci_pbm_info *pbm; | 1347 | struct pci_pbm_info *pbm; |
1346 | const char *chipset_name; | 1348 | const char *chipset_name; |
1347 | int is_pbm_a, err; | 1349 | int is_pbm_a, err; |
@@ -1422,7 +1424,7 @@ static int __devinit schizo_pbm_init(struct pci_controller_info *p, | |||
1422 | 1424 | ||
1423 | schizo_pbm_strbuf_init(pbm); | 1425 | schizo_pbm_strbuf_init(pbm); |
1424 | 1426 | ||
1425 | schizo_scan_bus(pbm); | 1427 | schizo_scan_bus(pbm, &op->dev); |
1426 | 1428 | ||
1427 | return 0; | 1429 | return 0; |
1428 | } | 1430 | } |
@@ -1437,8 +1439,9 @@ static inline int portid_compare(u32 x, u32 y, int chip_type) | |||
1437 | return (x == y); | 1439 | return (x == y); |
1438 | } | 1440 | } |
1439 | 1441 | ||
1440 | static int __devinit __schizo_init(struct device_node *dp, unsigned long chip_type) | 1442 | static int __devinit __schizo_init(struct of_device *op, unsigned long chip_type) |
1441 | { | 1443 | { |
1444 | struct device_node *dp = op->node; | ||
1442 | struct pci_controller_info *p; | 1445 | struct pci_controller_info *p; |
1443 | struct pci_pbm_info *pbm; | 1446 | struct pci_pbm_info *pbm; |
1444 | struct iommu *iommu; | 1447 | struct iommu *iommu; |
@@ -1450,7 +1453,7 @@ static int __devinit __schizo_init(struct device_node *dp, unsigned long chip_ty | |||
1450 | err = -ENOMEM; | 1453 | err = -ENOMEM; |
1451 | for (pbm = pci_pbm_root; pbm; pbm = pbm->next) { | 1454 | for (pbm = pci_pbm_root; pbm; pbm = pbm->next) { |
1452 | if (portid_compare(pbm->portid, portid, chip_type)) { | 1455 | if (portid_compare(pbm->portid, portid, chip_type)) { |
1453 | if (schizo_pbm_init(pbm->parent, dp, | 1456 | if (schizo_pbm_init(pbm->parent, op, |
1454 | portid, chip_type)) | 1457 | portid, chip_type)) |
1455 | goto out_err; | 1458 | goto out_err; |
1456 | return 0; | 1459 | return 0; |
@@ -1479,7 +1482,7 @@ static int __devinit __schizo_init(struct device_node *dp, unsigned long chip_ty | |||
1479 | 1482 | ||
1480 | p->pbm_B.iommu = iommu; | 1483 | p->pbm_B.iommu = iommu; |
1481 | 1484 | ||
1482 | if (schizo_pbm_init(p, dp, portid, chip_type)) | 1485 | if (schizo_pbm_init(p, op, portid, chip_type)) |
1483 | goto out_free_iommu_B; | 1486 | goto out_free_iommu_B; |
1484 | 1487 | ||
1485 | return 0; | 1488 | return 0; |
@@ -1500,7 +1503,7 @@ out_err: | |||
1500 | static int __devinit schizo_probe(struct of_device *op, | 1503 | static int __devinit schizo_probe(struct of_device *op, |
1501 | const struct of_device_id *match) | 1504 | const struct of_device_id *match) |
1502 | { | 1505 | { |
1503 | return __schizo_init(op->node, (unsigned long) match->data); | 1506 | return __schizo_init(op, (unsigned long) match->data); |
1504 | } | 1507 | } |
1505 | 1508 | ||
1506 | /* The ordering of this table is very important. Some Tomatillo | 1509 | /* The ordering of this table is very important. Some Tomatillo |