Commit 601bf18b authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Rich Felker

sh: pci: Modernize printing of kernel messages

  - Convert from printk() to pr_*(),
  - Add missing continuations,
  - Join broken messages.

Note that printk(KERN_DEBUG ...) is retained, to preserve behavior
(pr_debug() is a dummy if DEBUG is not defined).
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarRich Felker <dalias@libc.org>
parent f88c6a26
...@@ -54,7 +54,7 @@ int __init pci_is_66mhz_capable(struct pci_channel *hose, ...@@ -54,7 +54,7 @@ int __init pci_is_66mhz_capable(struct pci_channel *hose,
int cap66 = -1; int cap66 = -1;
u16 stat; u16 stat;
printk(KERN_INFO "PCI: Checking 66MHz capabilities...\n"); pr_info("PCI: Checking 66MHz capabilities...\n");
for (pci_devfn = 0; pci_devfn < 0xff; pci_devfn++) { for (pci_devfn = 0; pci_devfn < 0xff; pci_devfn++) {
if (PCI_FUNC(pci_devfn)) if (PCI_FUNC(pci_devfn))
...@@ -134,7 +134,7 @@ unsigned int pcibios_handle_status_errors(unsigned long addr, ...@@ -134,7 +134,7 @@ unsigned int pcibios_handle_status_errors(unsigned long addr,
pcibios_report_status(PCI_STATUS_REC_TARGET_ABORT | pcibios_report_status(PCI_STATUS_REC_TARGET_ABORT |
PCI_STATUS_SIG_TARGET_ABORT | PCI_STATUS_SIG_TARGET_ABORT |
PCI_STATUS_REC_MASTER_ABORT, 1); PCI_STATUS_REC_MASTER_ABORT, 1);
printk("\n"); pr_cont("\n");
cmd |= PCI_STATUS_REC_TARGET_ABORT; cmd |= PCI_STATUS_REC_TARGET_ABORT;
} }
...@@ -143,7 +143,7 @@ unsigned int pcibios_handle_status_errors(unsigned long addr, ...@@ -143,7 +143,7 @@ unsigned int pcibios_handle_status_errors(unsigned long addr,
printk(KERN_DEBUG "PCI: parity error detected: "); printk(KERN_DEBUG "PCI: parity error detected: ");
pcibios_report_status(PCI_STATUS_PARITY | pcibios_report_status(PCI_STATUS_PARITY |
PCI_STATUS_DETECTED_PARITY, 1); PCI_STATUS_DETECTED_PARITY, 1);
printk("\n"); pr_cont("\n");
cmd |= PCI_STATUS_PARITY | PCI_STATUS_DETECTED_PARITY; cmd |= PCI_STATUS_PARITY | PCI_STATUS_DETECTED_PARITY;
......
...@@ -148,7 +148,7 @@ static irqreturn_t sh7780_pci_serr_irq(int irq, void *dev_id) ...@@ -148,7 +148,7 @@ static irqreturn_t sh7780_pci_serr_irq(int irq, void *dev_id)
printk(KERN_DEBUG "PCI: system error received: "); printk(KERN_DEBUG "PCI: system error received: ");
pcibios_report_status(PCI_STATUS_SIG_SYSTEM_ERROR, 1); pcibios_report_status(PCI_STATUS_SIG_SYSTEM_ERROR, 1);
printk("\n"); pr_cont("\n");
/* Deassert SERR */ /* Deassert SERR */
__raw_writel(SH4_PCIINTM_SDIM, hose->reg_base + SH4_PCIINTM); __raw_writel(SH4_PCIINTM_SDIM, hose->reg_base + SH4_PCIINTM);
...@@ -179,7 +179,7 @@ static int __init sh7780_pci_setup_irqs(struct pci_channel *hose) ...@@ -179,7 +179,7 @@ static int __init sh7780_pci_setup_irqs(struct pci_channel *hose)
ret = request_irq(hose->serr_irq, sh7780_pci_serr_irq, 0, ret = request_irq(hose->serr_irq, sh7780_pci_serr_irq, 0,
"PCI SERR interrupt", hose); "PCI SERR interrupt", hose);
if (unlikely(ret)) { if (unlikely(ret)) {
printk(KERN_ERR "PCI: Failed hooking SERR IRQ\n"); pr_err("PCI: Failed hooking SERR IRQ\n");
return ret; return ret;
} }
...@@ -250,7 +250,7 @@ static int __init sh7780_pci_init(void) ...@@ -250,7 +250,7 @@ static int __init sh7780_pci_init(void)
const char *type; const char *type;
int ret, i; int ret, i;
printk(KERN_NOTICE "PCI: Starting initialization.\n"); pr_notice("PCI: Starting initialization.\n");
chan->reg_base = 0xfe040000; chan->reg_base = 0xfe040000;
...@@ -270,7 +270,7 @@ static int __init sh7780_pci_init(void) ...@@ -270,7 +270,7 @@ static int __init sh7780_pci_init(void)
id = __raw_readw(chan->reg_base + PCI_VENDOR_ID); id = __raw_readw(chan->reg_base + PCI_VENDOR_ID);
if (id != PCI_VENDOR_ID_RENESAS) { if (id != PCI_VENDOR_ID_RENESAS) {
printk(KERN_ERR "PCI: Unknown vendor ID 0x%04x.\n", id); pr_err("PCI: Unknown vendor ID 0x%04x.\n", id);
return -ENODEV; return -ENODEV;
} }
...@@ -281,14 +281,13 @@ static int __init sh7780_pci_init(void) ...@@ -281,14 +281,13 @@ static int __init sh7780_pci_init(void)
(id == PCI_DEVICE_ID_RENESAS_SH7785) ? "SH7785" : (id == PCI_DEVICE_ID_RENESAS_SH7785) ? "SH7785" :
NULL; NULL;
if (unlikely(!type)) { if (unlikely(!type)) {
printk(KERN_ERR "PCI: Found an unsupported Renesas host " pr_err("PCI: Found an unsupported Renesas host controller, device id 0x%04x.\n",
"controller, device id 0x%04x.\n", id); id);
return -EINVAL; return -EINVAL;
} }
printk(KERN_NOTICE "PCI: Found a Renesas %s host " pr_notice("PCI: Found a Renesas %s host controller, revision %d.\n",
"controller, revision %d.\n", type, type, __raw_readb(chan->reg_base + PCI_REVISION_ID));
__raw_readb(chan->reg_base + PCI_REVISION_ID));
/* /*
* Now throw it in to register initialization mode and * Now throw it in to register initialization mode and
...@@ -395,9 +394,9 @@ static int __init sh7780_pci_init(void) ...@@ -395,9 +394,9 @@ static int __init sh7780_pci_init(void)
sh7780_pci66_init(chan); sh7780_pci66_init(chan);
printk(KERN_NOTICE "PCI: Running at %dMHz.\n", pr_notice("PCI: Running at %dMHz.\n",
(__raw_readw(chan->reg_base + PCI_STATUS) & PCI_STATUS_66MHZ) ? (__raw_readw(chan->reg_base + PCI_STATUS) & PCI_STATUS_66MHZ)
66 : 33); ? 66 : 33);
return 0; return 0;
......
...@@ -120,8 +120,7 @@ int register_pci_controller(struct pci_channel *hose) ...@@ -120,8 +120,7 @@ int register_pci_controller(struct pci_channel *hose)
* Do not panic here but later - this might happen before console init. * Do not panic here but later - this might happen before console init.
*/ */
if (!hose->io_map_base) { if (!hose->io_map_base) {
printk(KERN_WARNING pr_warn("registering PCI controller with io_map_base unset\n");
"registering PCI controller with io_map_base unset\n");
} }
/* /*
...@@ -145,7 +144,7 @@ int register_pci_controller(struct pci_channel *hose) ...@@ -145,7 +144,7 @@ int register_pci_controller(struct pci_channel *hose)
for (--i; i >= 0; i--) for (--i; i >= 0; i--)
release_resource(&hose->resources[i]); release_resource(&hose->resources[i]);
printk(KERN_WARNING "Skipping PCI bus scan due to resource conflict\n"); pr_warn("Skipping PCI bus scan due to resource conflict\n");
return -1; return -1;
} }
...@@ -213,8 +212,8 @@ pcibios_bus_report_status_early(struct pci_channel *hose, ...@@ -213,8 +212,8 @@ pcibios_bus_report_status_early(struct pci_channel *hose,
pci_devfn, PCI_STATUS, pci_devfn, PCI_STATUS,
status & status_mask); status & status_mask);
if (warn) if (warn)
printk("(%02x:%02x: %04X) ", current_bus, pr_cont("(%02x:%02x: %04X) ", current_bus, pci_devfn,
pci_devfn, status); status);
} }
} }
...@@ -249,7 +248,7 @@ pcibios_bus_report_status(struct pci_bus *bus, unsigned int status_mask, ...@@ -249,7 +248,7 @@ pcibios_bus_report_status(struct pci_bus *bus, unsigned int status_mask,
pci_write_config_word(dev, PCI_STATUS, status & status_mask); pci_write_config_word(dev, PCI_STATUS, status & status_mask);
if (warn) if (warn)
printk("(%s: %04X) ", pci_name(dev), status); pr_cont("(%s: %04X) ", pci_name(dev), status);
} }
list_for_each_entry(dev, &bus->devices, bus_list) list_for_each_entry(dev, &bus->devices, bus_list)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment