diff options
Diffstat (limited to 'arch/sparc/kernel/pci_schizo.c')
-rw-r--r-- | arch/sparc/kernel/pci_schizo.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c index 445a47a2fb3d..f030b02edddd 100644 --- a/arch/sparc/kernel/pci_schizo.c +++ b/arch/sparc/kernel/pci_schizo.c | |||
@@ -264,7 +264,7 @@ static void schizo_check_iommu_error_pbm(struct pci_pbm_info *pbm, | |||
264 | default: | 264 | default: |
265 | type_string = "ECC Error"; | 265 | type_string = "ECC Error"; |
266 | break; | 266 | break; |
267 | }; | 267 | } |
268 | printk("%s: IOMMU Error, type[%s]\n", | 268 | printk("%s: IOMMU Error, type[%s]\n", |
269 | pbm->name, type_string); | 269 | pbm->name, type_string); |
270 | 270 | ||
@@ -319,7 +319,7 @@ static void schizo_check_iommu_error_pbm(struct pci_pbm_info *pbm, | |||
319 | default: | 319 | default: |
320 | type_string = "ECC Error"; | 320 | type_string = "ECC Error"; |
321 | break; | 321 | break; |
322 | }; | 322 | } |
323 | printk("%s: IOMMU TAG(%d)[error(%s) ctx(%x) wr(%d) str(%d) " | 323 | printk("%s: IOMMU TAG(%d)[error(%s) ctx(%x) wr(%d) str(%d) " |
324 | "sz(%dK) vpg(%08lx)]\n", | 324 | "sz(%dK) vpg(%08lx)]\n", |
325 | pbm->name, i, type_string, | 325 | pbm->name, i, type_string, |
@@ -1313,7 +1313,7 @@ static int __devinit schizo_pbm_init(struct pci_pbm_info *pbm, | |||
1313 | const struct linux_prom64_registers *regs; | 1313 | const struct linux_prom64_registers *regs; |
1314 | struct device_node *dp = op->dev.of_node; | 1314 | struct device_node *dp = op->dev.of_node; |
1315 | const char *chipset_name; | 1315 | const char *chipset_name; |
1316 | int is_pbm_a, err; | 1316 | int err; |
1317 | 1317 | ||
1318 | switch (chip_type) { | 1318 | switch (chip_type) { |
1319 | case PBM_CHIP_TYPE_TOMATILLO: | 1319 | case PBM_CHIP_TYPE_TOMATILLO: |
@@ -1328,7 +1328,7 @@ static int __devinit schizo_pbm_init(struct pci_pbm_info *pbm, | |||
1328 | default: | 1328 | default: |
1329 | chipset_name = "SCHIZO"; | 1329 | chipset_name = "SCHIZO"; |
1330 | break; | 1330 | break; |
1331 | }; | 1331 | } |
1332 | 1332 | ||
1333 | /* For SCHIZO, three OBP regs: | 1333 | /* For SCHIZO, three OBP regs: |
1334 | * 1) PBM controller regs | 1334 | * 1) PBM controller regs |
@@ -1343,8 +1343,6 @@ static int __devinit schizo_pbm_init(struct pci_pbm_info *pbm, | |||
1343 | */ | 1343 | */ |
1344 | regs = of_get_property(dp, "reg", NULL); | 1344 | regs = of_get_property(dp, "reg", NULL); |
1345 | 1345 | ||
1346 | is_pbm_a = ((regs[0].phys_addr & 0x00700000) == 0x00600000); | ||
1347 | |||
1348 | pbm->next = pci_pbm_root; | 1346 | pbm->next = pci_pbm_root; |
1349 | pci_pbm_root = pbm; | 1347 | pci_pbm_root = pbm; |
1350 | 1348 | ||
@@ -1460,10 +1458,15 @@ out_err: | |||
1460 | return err; | 1458 | return err; |
1461 | } | 1459 | } |
1462 | 1460 | ||
1463 | static int __devinit schizo_probe(struct platform_device *op, | 1461 | static const struct of_device_id schizo_match[]; |
1464 | const struct of_device_id *match) | 1462 | static int __devinit schizo_probe(struct platform_device *op) |
1465 | { | 1463 | { |
1466 | return __schizo_init(op, (unsigned long) match->data); | 1464 | const struct of_device_id *match; |
1465 | |||
1466 | match = of_match_device(schizo_match, &op->dev); | ||
1467 | if (!match) | ||
1468 | return -EINVAL; | ||
1469 | return __schizo_init(op, (unsigned long)match->data); | ||
1467 | } | 1470 | } |
1468 | 1471 | ||
1469 | /* The ordering of this table is very important. Some Tomatillo | 1472 | /* The ordering of this table is very important. Some Tomatillo |
@@ -1471,7 +1474,7 @@ static int __devinit schizo_probe(struct platform_device *op, | |||
1471 | * and pci108e,8001. So list the chips in reverse chronological | 1474 | * and pci108e,8001. So list the chips in reverse chronological |
1472 | * order. | 1475 | * order. |
1473 | */ | 1476 | */ |
1474 | static struct of_device_id __initdata schizo_match[] = { | 1477 | static const struct of_device_id schizo_match[] = { |
1475 | { | 1478 | { |
1476 | .name = "pci", | 1479 | .name = "pci", |
1477 | .compatible = "pci108e,a801", | 1480 | .compatible = "pci108e,a801", |
@@ -1490,7 +1493,7 @@ static struct of_device_id __initdata schizo_match[] = { | |||
1490 | {}, | 1493 | {}, |
1491 | }; | 1494 | }; |
1492 | 1495 | ||
1493 | static struct of_platform_driver schizo_driver = { | 1496 | static struct platform_driver schizo_driver = { |
1494 | .driver = { | 1497 | .driver = { |
1495 | .name = DRIVER_NAME, | 1498 | .name = DRIVER_NAME, |
1496 | .owner = THIS_MODULE, | 1499 | .owner = THIS_MODULE, |
@@ -1501,7 +1504,7 @@ static struct of_platform_driver schizo_driver = { | |||
1501 | 1504 | ||
1502 | static int __init schizo_init(void) | 1505 | static int __init schizo_init(void) |
1503 | { | 1506 | { |
1504 | return of_register_platform_driver(&schizo_driver); | 1507 | return platform_driver_register(&schizo_driver); |
1505 | } | 1508 | } |
1506 | 1509 | ||
1507 | subsys_initcall(schizo_init); | 1510 | subsys_initcall(schizo_init); |