aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2018-04-21 15:35:42 -0400
committerBjorn Helgaas <helgaas@kernel.org>2018-05-22 08:54:06 -0400
commitadedc05e938fada9c39c89bdea80217355fce6e8 (patch)
treeeaa46aa23973010307478342d6a6d69cb293e381
parentb30f46518a6c2695d389065994792efaa9c7bc75 (diff)
sparc/PCI: Use dev_printk() when possible
Use the pci_info() and pci_err() wrappers for dev_printk() when possible. Log PCI device vendor and device IDs and BAR information in the same format used by other architectures. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r--arch/sparc/kernel/leon_pci.c4
-rw-r--r--arch/sparc/kernel/pci.c94
-rw-r--r--arch/sparc/kernel/pci_common.c12
-rw-r--r--arch/sparc/kernel/pci_msi.c10
-rw-r--r--arch/sparc/kernel/pcic.c29
5 files changed, 70 insertions, 79 deletions
diff --git a/arch/sparc/kernel/leon_pci.c b/arch/sparc/kernel/leon_pci.c
index c2a5033b07c3..e5e5ff6b9a5c 100644
--- a/arch/sparc/kernel/leon_pci.c
+++ b/arch/sparc/kernel/leon_pci.c
@@ -82,9 +82,7 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
82 } 82 }
83 83
84 if (cmd != oldcmd) { 84 if (cmd != oldcmd) {
85 printk(KERN_DEBUG "PCI: Enabling device: (%s), cmd %x\n", 85 pci_info(dev, "enabling device (%04x -> %04x)\n", oldcmd, cmd);
86 pci_name(dev), cmd);
87 /* Enable the appropriate bits in the PCI command register. */
88 pci_write_config_word(dev, PCI_COMMAND, cmd); 86 pci_write_config_word(dev, PCI_COMMAND, cmd);
89 } 87 }
90 return 0; 88 return 0;
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index 8a04983cf8a1..17ea16a1337c 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -214,8 +214,8 @@ static void pci_parse_of_addrs(struct platform_device *op,
214 if (!addrs) 214 if (!addrs)
215 return; 215 return;
216 if (ofpci_verbose) 216 if (ofpci_verbose)
217 printk(" parse addresses (%d bytes) @ %p\n", 217 pci_info(dev, " parse addresses (%d bytes) @ %p\n",
218 proplen, addrs); 218 proplen, addrs);
219 op_res = &op->resource[0]; 219 op_res = &op->resource[0];
220 for (; proplen >= 20; proplen -= 20, addrs += 5, op_res++) { 220 for (; proplen >= 20; proplen -= 20, addrs += 5, op_res++) {
221 struct resource *res; 221 struct resource *res;
@@ -227,8 +227,8 @@ static void pci_parse_of_addrs(struct platform_device *op,
227 continue; 227 continue;
228 i = addrs[0] & 0xff; 228 i = addrs[0] & 0xff;
229 if (ofpci_verbose) 229 if (ofpci_verbose)
230 printk(" start: %llx, end: %llx, i: %x\n", 230 pci_info(dev, " start: %llx, end: %llx, i: %x\n",
231 op_res->start, op_res->end, i); 231 op_res->start, op_res->end, i);
232 232
233 if (PCI_BASE_ADDRESS_0 <= i && i <= PCI_BASE_ADDRESS_5) { 233 if (PCI_BASE_ADDRESS_0 <= i && i <= PCI_BASE_ADDRESS_5) {
234 res = &dev->resource[(i - PCI_BASE_ADDRESS_0) >> 2]; 234 res = &dev->resource[(i - PCI_BASE_ADDRESS_0) >> 2];
@@ -236,13 +236,15 @@ static void pci_parse_of_addrs(struct platform_device *op,
236 res = &dev->resource[PCI_ROM_RESOURCE]; 236 res = &dev->resource[PCI_ROM_RESOURCE];
237 flags |= IORESOURCE_READONLY | IORESOURCE_SIZEALIGN; 237 flags |= IORESOURCE_READONLY | IORESOURCE_SIZEALIGN;
238 } else { 238 } else {
239 printk(KERN_ERR "PCI: bad cfg reg num 0x%x\n", i); 239 pci_err(dev, "bad cfg reg num 0x%x\n", i);
240 continue; 240 continue;
241 } 241 }
242 res->start = op_res->start; 242 res->start = op_res->start;
243 res->end = op_res->end; 243 res->end = op_res->end;
244 res->flags = flags; 244 res->flags = flags;
245 res->name = pci_name(dev); 245 res->name = pci_name(dev);
246
247 pci_info(dev, "reg 0x%x: %pR\n", i, res);
246 } 248 }
247} 249}
248 250
@@ -289,8 +291,8 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
289 type = ""; 291 type = "";
290 292
291 if (ofpci_verbose) 293 if (ofpci_verbose)
292 printk(" create device, devfn: %x, type: %s\n", 294 pci_info(bus," create device, devfn: %x, type: %s\n",
293 devfn, type); 295 devfn, type);
294 296
295 dev->sysdata = node; 297 dev->sysdata = node;
296 dev->dev.parent = bus->bridge; 298 dev->dev.parent = bus->bridge;
@@ -323,10 +325,6 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
323 dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(bus), 325 dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(bus),
324 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); 326 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn));
325 327
326 if (ofpci_verbose)
327 printk(" class: 0x%x device name: %s\n",
328 dev->class, pci_name(dev));
329
330 /* I have seen IDE devices which will not respond to 328 /* I have seen IDE devices which will not respond to
331 * the bmdma simplex check reads if bus mastering is 329 * the bmdma simplex check reads if bus mastering is
332 * disabled. 330 * disabled.
@@ -353,10 +351,13 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
353 dev->irq = PCI_IRQ_NONE; 351 dev->irq = PCI_IRQ_NONE;
354 } 352 }
355 353
354 pci_info(dev, "[%04x:%04x] type %02x class %#08x\n",
355 dev->vendor, dev->device, dev->hdr_type, dev->class);
356
356 pci_parse_of_addrs(sd->op, node, dev); 357 pci_parse_of_addrs(sd->op, node, dev);
357 358
358 if (ofpci_verbose) 359 if (ofpci_verbose)
359 printk(" adding to system ...\n"); 360 pci_info(dev, " adding to system ...\n");
360 361
361 pci_device_add(dev, bus); 362 pci_device_add(dev, bus);
362 363
@@ -430,19 +431,19 @@ static void of_scan_pci_bridge(struct pci_pbm_info *pbm,
430 u64 size; 431 u64 size;
431 432
432 if (ofpci_verbose) 433 if (ofpci_verbose)
433 printk("of_scan_pci_bridge(%s)\n", node->full_name); 434 pci_info(dev, "of_scan_pci_bridge(%s)\n", node->full_name);
434 435
435 /* parse bus-range property */ 436 /* parse bus-range property */
436 busrange = of_get_property(node, "bus-range", &len); 437 busrange = of_get_property(node, "bus-range", &len);
437 if (busrange == NULL || len != 8) { 438 if (busrange == NULL || len != 8) {
438 printk(KERN_DEBUG "Can't get bus-range for PCI-PCI bridge %s\n", 439 pci_info(dev, "Can't get bus-range for PCI-PCI bridge %s\n",
439 node->full_name); 440 node->full_name);
440 return; 441 return;
441 } 442 }
442 443
443 if (ofpci_verbose) 444 if (ofpci_verbose)
444 printk(" Bridge bus range [%u --> %u]\n", 445 pci_info(dev, " Bridge bus range [%u --> %u]\n",
445 busrange[0], busrange[1]); 446 busrange[0], busrange[1]);
446 447
447 ranges = of_get_property(node, "ranges", &len); 448 ranges = of_get_property(node, "ranges", &len);
448 simba = 0; 449 simba = 0;
@@ -454,8 +455,8 @@ static void of_scan_pci_bridge(struct pci_pbm_info *pbm,
454 455
455 bus = pci_add_new_bus(dev->bus, dev, busrange[0]); 456 bus = pci_add_new_bus(dev->bus, dev, busrange[0]);
456 if (!bus) { 457 if (!bus) {
457 printk(KERN_ERR "Failed to create pci bus for %s\n", 458 pci_err(dev, "Failed to create pci bus for %s\n",
458 node->full_name); 459 node->full_name);
459 return; 460 return;
460 } 461 }
461 462
@@ -464,8 +465,8 @@ static void of_scan_pci_bridge(struct pci_pbm_info *pbm,
464 bus->bridge_ctl = 0; 465 bus->bridge_ctl = 0;
465 466
466 if (ofpci_verbose) 467 if (ofpci_verbose)
467 printk(" Bridge ranges[%p] simba[%d]\n", 468 pci_info(dev, " Bridge ranges[%p] simba[%d]\n",
468 ranges, simba); 469 ranges, simba);
469 470
470 /* parse ranges property, or cook one up by hand for Simba */ 471 /* parse ranges property, or cook one up by hand for Simba */
471 /* PCI #address-cells == 3 and #size-cells == 2 always */ 472 /* PCI #address-cells == 3 and #size-cells == 2 always */
@@ -487,10 +488,10 @@ static void of_scan_pci_bridge(struct pci_pbm_info *pbm,
487 u64 start; 488 u64 start;
488 489
489 if (ofpci_verbose) 490 if (ofpci_verbose)
490 printk(" RAW Range[%08x:%08x:%08x:%08x:%08x:%08x:" 491 pci_info(dev, " RAW Range[%08x:%08x:%08x:%08x:%08x:%08x:"
491 "%08x:%08x]\n", 492 "%08x:%08x]\n",
492 ranges[0], ranges[1], ranges[2], ranges[3], 493 ranges[0], ranges[1], ranges[2], ranges[3],
493 ranges[4], ranges[5], ranges[6], ranges[7]); 494 ranges[4], ranges[5], ranges[6], ranges[7]);
494 495
495 flags = pci_parse_of_flags(ranges[0]); 496 flags = pci_parse_of_flags(ranges[0]);
496 size = GET_64BIT(ranges, 6); 497 size = GET_64BIT(ranges, 6);
@@ -510,14 +511,14 @@ static void of_scan_pci_bridge(struct pci_pbm_info *pbm,
510 if (flags & IORESOURCE_IO) { 511 if (flags & IORESOURCE_IO) {
511 res = bus->resource[0]; 512 res = bus->resource[0];
512 if (res->flags) { 513 if (res->flags) {
513 printk(KERN_ERR "PCI: ignoring extra I/O range" 514 pci_err(dev, "ignoring extra I/O range"
514 " for bridge %s\n", node->full_name); 515 " for bridge %s\n", node->full_name);
515 continue; 516 continue;
516 } 517 }
517 } else { 518 } else {
518 if (i >= PCI_NUM_RESOURCES - PCI_BRIDGE_RESOURCES) { 519 if (i >= PCI_NUM_RESOURCES - PCI_BRIDGE_RESOURCES) {
519 printk(KERN_ERR "PCI: too many memory ranges" 520 pci_err(dev, "too many memory ranges"
520 " for bridge %s\n", node->full_name); 521 " for bridge %s\n", node->full_name);
521 continue; 522 continue;
522 } 523 }
523 res = bus->resource[i]; 524 res = bus->resource[i];
@@ -529,8 +530,8 @@ static void of_scan_pci_bridge(struct pci_pbm_info *pbm,
529 region.end = region.start + size - 1; 530 region.end = region.start + size - 1;
530 531
531 if (ofpci_verbose) 532 if (ofpci_verbose)
532 printk(" Using flags[%08x] start[%016llx] size[%016llx]\n", 533 pci_info(dev, " Using flags[%08x] start[%016llx] size[%016llx]\n",
533 flags, start, size); 534 flags, start, size);
534 535
535 pcibios_bus_to_resource(dev->bus, res, &region); 536 pcibios_bus_to_resource(dev->bus, res, &region);
536 } 537 }
@@ -538,7 +539,7 @@ after_ranges:
538 sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus), 539 sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus),
539 bus->number); 540 bus->number);
540 if (ofpci_verbose) 541 if (ofpci_verbose)
541 printk(" bus name: %s\n", bus->name); 542 pci_info(dev, " bus name: %s\n", bus->name);
542 543
543 pci_of_scan_bus(pbm, node, bus); 544 pci_of_scan_bus(pbm, node, bus);
544} 545}
@@ -553,14 +554,14 @@ static void pci_of_scan_bus(struct pci_pbm_info *pbm,
553 struct pci_dev *dev; 554 struct pci_dev *dev;
554 555
555 if (ofpci_verbose) 556 if (ofpci_verbose)
556 printk("PCI: scan_bus[%s] bus no %d\n", 557 pci_info(bus, "scan_bus[%s] bus no %d\n",
557 node->full_name, bus->number); 558 node->full_name, bus->number);
558 559
559 child = NULL; 560 child = NULL;
560 prev_devfn = -1; 561 prev_devfn = -1;
561 while ((child = of_get_next_child(node, child)) != NULL) { 562 while ((child = of_get_next_child(node, child)) != NULL) {
562 if (ofpci_verbose) 563 if (ofpci_verbose)
563 printk(" * %s\n", child->full_name); 564 pci_info(bus, " * %s\n", child->full_name);
564 reg = of_get_property(child, "reg", &reglen); 565 reg = of_get_property(child, "reg", &reglen);
565 if (reg == NULL || reglen < 20) 566 if (reg == NULL || reglen < 20)
566 continue; 567 continue;
@@ -581,8 +582,7 @@ static void pci_of_scan_bus(struct pci_pbm_info *pbm,
581 if (!dev) 582 if (!dev)
582 continue; 583 continue;
583 if (ofpci_verbose) 584 if (ofpci_verbose)
584 printk("PCI: dev header type: %x\n", 585 pci_info(dev, "dev header type: %x\n", dev->hdr_type);
585 dev->hdr_type);
586 586
587 if (pci_is_bridge(dev)) 587 if (pci_is_bridge(dev))
588 of_scan_pci_bridge(pbm, child, dev); 588 of_scan_pci_bridge(pbm, child, dev);
@@ -678,12 +678,8 @@ static void pci_claim_bus_resources(struct pci_bus *bus)
678 continue; 678 continue;
679 679
680 if (ofpci_verbose) 680 if (ofpci_verbose)
681 printk("PCI: Claiming %s: " 681 pci_info(dev, "Claiming Resource %d: %pR\n",
682 "Resource %d: %016llx..%016llx [%x]\n", 682 i, r);
683 pci_name(dev), i,
684 (unsigned long long)r->start,
685 (unsigned long long)r->end,
686 (unsigned int)r->flags);
687 683
688 pci_claim_resource(dev, i); 684 pci_claim_resource(dev, i);
689 } 685 }
@@ -755,9 +751,7 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
755 } 751 }
756 752
757 if (cmd != oldcmd) { 753 if (cmd != oldcmd) {
758 printk(KERN_DEBUG "PCI: Enabling device: (%s), cmd %x\n", 754 pci_info(dev, "enabling device (%04x -> %04x)\n", oldcmd, cmd);
759 pci_name(dev), cmd);
760 /* Enable the appropriate bits in the PCI command register. */
761 pci_write_config_word(dev, PCI_COMMAND, cmd); 755 pci_write_config_word(dev, PCI_COMMAND, cmd);
762 } 756 }
763 return 0; 757 return 0;
@@ -1117,8 +1111,8 @@ static void pci_bus_slot_names(struct device_node *node, struct pci_bus *bus)
1117 sp = prop->names; 1111 sp = prop->names;
1118 1112
1119 if (ofpci_verbose) 1113 if (ofpci_verbose)
1120 printk("PCI: Making slots for [%s] mask[0x%02x]\n", 1114 pci_info(bus, "Making slots for [%s] mask[0x%02x]\n",
1121 node->full_name, mask); 1115 node->full_name, mask);
1122 1116
1123 i = 0; 1117 i = 0;
1124 while (mask) { 1118 while (mask) {
@@ -1131,12 +1125,12 @@ static void pci_bus_slot_names(struct device_node *node, struct pci_bus *bus)
1131 } 1125 }
1132 1126
1133 if (ofpci_verbose) 1127 if (ofpci_verbose)
1134 printk("PCI: Making slot [%s]\n", sp); 1128 pci_info(bus, "Making slot [%s]\n", sp);
1135 1129
1136 pci_slot = pci_create_slot(bus, i, sp, NULL); 1130 pci_slot = pci_create_slot(bus, i, sp, NULL);
1137 if (IS_ERR(pci_slot)) 1131 if (IS_ERR(pci_slot))
1138 printk(KERN_ERR "PCI: pci_create_slot returned %ld\n", 1132 pci_err(bus, "pci_create_slot returned %ld\n",
1139 PTR_ERR(pci_slot)); 1133 PTR_ERR(pci_slot));
1140 1134
1141 sp += strlen(sp) + 1; 1135 sp += strlen(sp) + 1;
1142 mask &= ~this_bit; 1136 mask &= ~this_bit;
diff --git a/arch/sparc/kernel/pci_common.c b/arch/sparc/kernel/pci_common.c
index 9bb6a192ef3f..4759ccd542fe 100644
--- a/arch/sparc/kernel/pci_common.c
+++ b/arch/sparc/kernel/pci_common.c
@@ -489,8 +489,8 @@ void pci_scan_for_target_abort(struct pci_pbm_info *pbm,
489 PCI_STATUS_REC_TARGET_ABORT)); 489 PCI_STATUS_REC_TARGET_ABORT));
490 if (error_bits) { 490 if (error_bits) {
491 pci_write_config_word(pdev, PCI_STATUS, error_bits); 491 pci_write_config_word(pdev, PCI_STATUS, error_bits);
492 printk("%s: Device %s saw Target Abort [%016x]\n", 492 pci_info(pdev, "%s: Device saw Target Abort [%016x]\n",
493 pbm->name, pci_name(pdev), status); 493 pbm->name, status);
494 } 494 }
495 } 495 }
496 496
@@ -512,8 +512,8 @@ void pci_scan_for_master_abort(struct pci_pbm_info *pbm,
512 (status & (PCI_STATUS_REC_MASTER_ABORT)); 512 (status & (PCI_STATUS_REC_MASTER_ABORT));
513 if (error_bits) { 513 if (error_bits) {
514 pci_write_config_word(pdev, PCI_STATUS, error_bits); 514 pci_write_config_word(pdev, PCI_STATUS, error_bits);
515 printk("%s: Device %s received Master Abort [%016x]\n", 515 pci_info(pdev, "%s: Device received Master Abort "
516 pbm->name, pci_name(pdev), status); 516 "[%016x]\n", pbm->name, status);
517 } 517 }
518 } 518 }
519 519
@@ -536,8 +536,8 @@ void pci_scan_for_parity_error(struct pci_pbm_info *pbm,
536 PCI_STATUS_DETECTED_PARITY)); 536 PCI_STATUS_DETECTED_PARITY));
537 if (error_bits) { 537 if (error_bits) {
538 pci_write_config_word(pdev, PCI_STATUS, error_bits); 538 pci_write_config_word(pdev, PCI_STATUS, error_bits);
539 printk("%s: Device %s saw Parity Error [%016x]\n", 539 pci_info(pdev, "%s: Device saw Parity Error [%016x]\n",
540 pbm->name, pci_name(pdev), status); 540 pbm->name, status);
541 } 541 }
542 } 542 }
543 543
diff --git a/arch/sparc/kernel/pci_msi.c b/arch/sparc/kernel/pci_msi.c
index 1994d7638406..fb5899cbfa51 100644
--- a/arch/sparc/kernel/pci_msi.c
+++ b/arch/sparc/kernel/pci_msi.c
@@ -191,8 +191,8 @@ static void sparc64_teardown_msi_irq(unsigned int irq,
191 break; 191 break;
192 } 192 }
193 if (i >= pbm->msi_num) { 193 if (i >= pbm->msi_num) {
194 printk(KERN_ERR "%s: teardown: No MSI for irq %u\n", 194 pci_err(pdev, "%s: teardown: No MSI for irq %u\n", pbm->name,
195 pbm->name, irq); 195 irq);
196 return; 196 return;
197 } 197 }
198 198
@@ -201,9 +201,9 @@ static void sparc64_teardown_msi_irq(unsigned int irq,
201 201
202 err = ops->msi_teardown(pbm, msi_num); 202 err = ops->msi_teardown(pbm, msi_num);
203 if (err) { 203 if (err) {
204 printk(KERN_ERR "%s: teardown: ops->teardown() on MSI %u, " 204 pci_err(pdev, "%s: teardown: ops->teardown() on MSI %u, "
205 "irq %u, gives error %d\n", 205 "irq %u, gives error %d\n", pbm->name, msi_num, irq,
206 pbm->name, msi_num, irq, err); 206 err);
207 return; 207 return;
208 } 208 }
209 209
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c
index 7b137e07e0a4..ee4c9a9a171c 100644
--- a/arch/sparc/kernel/pcic.c
+++ b/arch/sparc/kernel/pcic.c
@@ -518,10 +518,10 @@ static void pcic_map_pci_device(struct linux_pcic *pcic,
518 * board in a PCI slot. We must remap it 518 * board in a PCI slot. We must remap it
519 * under 64K but it is not done yet. XXX 519 * under 64K but it is not done yet. XXX
520 */ 520 */
521 printk("PCIC: Skipping I/O space at 0x%lx, " 521 pci_info(dev, "PCIC: Skipping I/O space at "
522 "this will Oops if a driver attaches " 522 "0x%lx, this will Oops if a driver "
523 "device '%s' at %02x:%02x)\n", address, 523 "attaches device '%s'\n", address,
524 namebuf, dev->bus->number, dev->devfn); 524 namebuf);
525 } 525 }
526 } 526 }
527 } 527 }
@@ -551,8 +551,8 @@ pcic_fill_irq(struct linux_pcic *pcic, struct pci_dev *dev, int node)
551 p++; 551 p++;
552 } 552 }
553 if (i >= pcic->pcic_imdim) { 553 if (i >= pcic->pcic_imdim) {
554 printk("PCIC: device %s devfn %02x:%02x not found in %d\n", 554 pci_info(dev, "PCIC: device %s not found in %d\n", namebuf,
555 namebuf, dev->bus->number, dev->devfn, pcic->pcic_imdim); 555 pcic->pcic_imdim);
556 dev->irq = 0; 556 dev->irq = 0;
557 return; 557 return;
558 } 558 }
@@ -565,7 +565,7 @@ pcic_fill_irq(struct linux_pcic *pcic, struct pci_dev *dev, int node)
565 ivec = readw(pcic->pcic_regs+PCI_INT_SELECT_HI); 565 ivec = readw(pcic->pcic_regs+PCI_INT_SELECT_HI);
566 real_irq = ivec >> ((i-4) << 2) & 0xF; 566 real_irq = ivec >> ((i-4) << 2) & 0xF;
567 } else { /* Corrupted map */ 567 } else { /* Corrupted map */
568 printk("PCIC: BAD PIN %d\n", i); for (;;) {} 568 pci_info(dev, "PCIC: BAD PIN %d\n", i); for (;;) {}
569 } 569 }
570/* P3 */ /* printk("PCIC: device %s pin %d ivec 0x%x irq %x\n", namebuf, i, ivec, dev->irq); */ 570/* P3 */ /* printk("PCIC: device %s pin %d ivec 0x%x irq %x\n", namebuf, i, ivec, dev->irq); */
571 571
@@ -574,10 +574,10 @@ pcic_fill_irq(struct linux_pcic *pcic, struct pci_dev *dev, int node)
574 */ 574 */
575 if (real_irq == 0 || p->force) { 575 if (real_irq == 0 || p->force) {
576 if (p->irq == 0 || p->irq >= 15) { /* Corrupted map */ 576 if (p->irq == 0 || p->irq >= 15) { /* Corrupted map */
577 printk("PCIC: BAD IRQ %d\n", p->irq); for (;;) {} 577 pci_info(dev, "PCIC: BAD IRQ %d\n", p->irq); for (;;) {}
578 } 578 }
579 printk("PCIC: setting irq %d at pin %d for device %02x:%02x\n", 579 pci_info(dev, "PCIC: setting irq %d at pin %d\n", p->irq,
580 p->irq, p->pin, dev->bus->number, dev->devfn); 580 p->pin);
581 real_irq = p->irq; 581 real_irq = p->irq;
582 582
583 i = p->pin; 583 i = p->pin;
@@ -608,7 +608,7 @@ void pcibios_fixup_bus(struct pci_bus *bus)
608 struct pcidev_cookie *pcp; 608 struct pcidev_cookie *pcp;
609 609
610 if (!pcic0_up) { 610 if (!pcic0_up) {
611 printk("pcibios_fixup_bus: no PCIC\n"); 611 pci_info(bus, "pcibios_fixup_bus: no PCIC\n");
612 return; 612 return;
613 } 613 }
614 pcic = &pcic0; 614 pcic = &pcic0;
@@ -617,7 +617,8 @@ void pcibios_fixup_bus(struct pci_bus *bus)
617 * Next crud is an equivalent of pbm = pcic_bus_to_pbm(bus); 617 * Next crud is an equivalent of pbm = pcic_bus_to_pbm(bus);
618 */ 618 */
619 if (bus->number != 0) { 619 if (bus->number != 0) {
620 printk("pcibios_fixup_bus: nonzero bus 0x%x\n", bus->number); 620 pci_info(bus, "pcibios_fixup_bus: nonzero bus 0x%x\n",
621 bus->number);
621 return; 622 return;
622 } 623 }
623 624
@@ -662,9 +663,7 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
662 } 663 }
663 664
664 if (cmd != oldcmd) { 665 if (cmd != oldcmd) {
665 printk(KERN_DEBUG "PCI: Enabling device: (%s), cmd %x\n", 666 pci_info(dev, "enabling device (%04x -> %04x)\n", oldcmd, cmd);
666 pci_name(dev), cmd);
667 /* Enable the appropriate bits in the PCI command register. */
668 pci_write_config_word(dev, PCI_COMMAND, cmd); 667 pci_write_config_word(dev, PCI_COMMAND, cmd);
669 } 668 }
670 return 0; 669 return 0;