Commit 88857ebe authored by York Sun's avatar York Sun Committed by Borislav Petkov

EDAC, mpc85xx: Replace printk() with pr_* format

Replace printk() with pr_err/pr_warn/pr_info macros.
Signed-off-by: default avatarYork Sun <york.sun@nxp.com>
Cc: Johannes Thumshirn <morbidrsa@gmail.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: oss@buserror.net
Cc: stuart.yoder@nxp.com
Link: http://lkml.kernel.org/r/1470779760-16483-3-git-send-email-york.sun@nxp.com
[ Boris: unbreak strings for easier greppability. ]
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
parent 9e6a03a0
...@@ -157,18 +157,18 @@ static void mpc85xx_pci_check(struct edac_pci_ctl_info *pci) ...@@ -157,18 +157,18 @@ static void mpc85xx_pci_check(struct edac_pci_ctl_info *pci)
return; return;
} }
printk(KERN_ERR "PCI error(s) detected\n"); pr_err("PCI error(s) detected\n");
printk(KERN_ERR "PCI/X ERR_DR register: %#08x\n", err_detect); pr_err("PCI/X ERR_DR register: %#08x\n", err_detect);
printk(KERN_ERR "PCI/X ERR_ATTRIB register: %#08x\n", pr_err("PCI/X ERR_ATTRIB register: %#08x\n",
in_be32(pdata->pci_vbase + MPC85XX_PCI_ERR_ATTRIB)); in_be32(pdata->pci_vbase + MPC85XX_PCI_ERR_ATTRIB));
printk(KERN_ERR "PCI/X ERR_ADDR register: %#08x\n", pr_err("PCI/X ERR_ADDR register: %#08x\n",
in_be32(pdata->pci_vbase + MPC85XX_PCI_ERR_ADDR)); in_be32(pdata->pci_vbase + MPC85XX_PCI_ERR_ADDR));
printk(KERN_ERR "PCI/X ERR_EXT_ADDR register: %#08x\n", pr_err("PCI/X ERR_EXT_ADDR register: %#08x\n",
in_be32(pdata->pci_vbase + MPC85XX_PCI_ERR_EXT_ADDR)); in_be32(pdata->pci_vbase + MPC85XX_PCI_ERR_EXT_ADDR));
printk(KERN_ERR "PCI/X ERR_DL register: %#08x\n", pr_err("PCI/X ERR_DL register: %#08x\n",
in_be32(pdata->pci_vbase + MPC85XX_PCI_ERR_DL)); in_be32(pdata->pci_vbase + MPC85XX_PCI_ERR_DL));
printk(KERN_ERR "PCI/X ERR_DH register: %#08x\n", pr_err("PCI/X ERR_DH register: %#08x\n",
in_be32(pdata->pci_vbase + MPC85XX_PCI_ERR_DH)); in_be32(pdata->pci_vbase + MPC85XX_PCI_ERR_DH));
/* clear error bits */ /* clear error bits */
...@@ -297,8 +297,7 @@ static int mpc85xx_pci_err_probe(struct platform_device *op) ...@@ -297,8 +297,7 @@ static int mpc85xx_pci_err_probe(struct platform_device *op)
res = of_address_to_resource(of_node, 0, &r); res = of_address_to_resource(of_node, 0, &r);
if (res) { if (res) {
printk(KERN_ERR "%s: Unable to get resource for " pr_err("%s: Unable to get resource for PCI err regs\n", __func__);
"PCI err regs\n", __func__);
goto err; goto err;
} }
...@@ -307,15 +306,14 @@ static int mpc85xx_pci_err_probe(struct platform_device *op) ...@@ -307,15 +306,14 @@ static int mpc85xx_pci_err_probe(struct platform_device *op)
if (!devm_request_mem_region(&op->dev, r.start, resource_size(&r), if (!devm_request_mem_region(&op->dev, r.start, resource_size(&r),
pdata->name)) { pdata->name)) {
printk(KERN_ERR "%s: Error while requesting mem region\n", pr_err("%s: Error while requesting mem region\n", __func__);
__func__);
res = -EBUSY; res = -EBUSY;
goto err; goto err;
} }
pdata->pci_vbase = devm_ioremap(&op->dev, r.start, resource_size(&r)); pdata->pci_vbase = devm_ioremap(&op->dev, r.start, resource_size(&r));
if (!pdata->pci_vbase) { if (!pdata->pci_vbase) {
printk(KERN_ERR "%s: Unable to setup PCI err regs\n", __func__); pr_err("%s: Unable to setup PCI err regs\n", __func__);
res = -ENOMEM; res = -ENOMEM;
goto err; goto err;
} }
...@@ -359,15 +357,14 @@ static int mpc85xx_pci_err_probe(struct platform_device *op) ...@@ -359,15 +357,14 @@ static int mpc85xx_pci_err_probe(struct platform_device *op)
IRQF_SHARED, IRQF_SHARED,
"[EDAC] PCI err", pci); "[EDAC] PCI err", pci);
if (res < 0) { if (res < 0) {
printk(KERN_ERR pr_err("%s: Unable to request irq %d for MPC85xx PCI err\n",
"%s: Unable to request irq %d for " __func__, pdata->irq);
"MPC85xx PCI err\n", __func__, pdata->irq);
irq_dispose_mapping(pdata->irq); irq_dispose_mapping(pdata->irq);
res = -ENODEV; res = -ENODEV;
goto err2; goto err2;
} }
printk(KERN_INFO EDAC_MOD_STR " acquired irq %d for PCI Err\n", pr_info(EDAC_MOD_STR " acquired irq %d for PCI Err\n",
pdata->irq); pdata->irq);
} }
...@@ -389,7 +386,7 @@ static int mpc85xx_pci_err_probe(struct platform_device *op) ...@@ -389,7 +386,7 @@ static int mpc85xx_pci_err_probe(struct platform_device *op)
devres_remove_group(&op->dev, mpc85xx_pci_err_probe); devres_remove_group(&op->dev, mpc85xx_pci_err_probe);
edac_dbg(3, "success\n"); edac_dbg(3, "success\n");
printk(KERN_INFO EDAC_MOD_STR " PCI err registered\n"); pr_info(EDAC_MOD_STR " PCI err registered\n");
return 0; return 0;
...@@ -532,17 +529,17 @@ static void mpc85xx_l2_check(struct edac_device_ctl_info *edac_dev) ...@@ -532,17 +529,17 @@ static void mpc85xx_l2_check(struct edac_device_ctl_info *edac_dev)
if (!(err_detect & L2_EDE_MASK)) if (!(err_detect & L2_EDE_MASK))
return; return;
printk(KERN_ERR "ECC Error in CPU L2 cache\n"); pr_err("ECC Error in CPU L2 cache\n");
printk(KERN_ERR "L2 Error Detect Register: 0x%08x\n", err_detect); pr_err("L2 Error Detect Register: 0x%08x\n", err_detect);
printk(KERN_ERR "L2 Error Capture Data High Register: 0x%08x\n", pr_err("L2 Error Capture Data High Register: 0x%08x\n",
in_be32(pdata->l2_vbase + MPC85XX_L2_CAPTDATAHI)); in_be32(pdata->l2_vbase + MPC85XX_L2_CAPTDATAHI));
printk(KERN_ERR "L2 Error Capture Data Lo Register: 0x%08x\n", pr_err("L2 Error Capture Data Lo Register: 0x%08x\n",
in_be32(pdata->l2_vbase + MPC85XX_L2_CAPTDATALO)); in_be32(pdata->l2_vbase + MPC85XX_L2_CAPTDATALO));
printk(KERN_ERR "L2 Error Syndrome Register: 0x%08x\n", pr_err("L2 Error Syndrome Register: 0x%08x\n",
in_be32(pdata->l2_vbase + MPC85XX_L2_CAPTECC)); in_be32(pdata->l2_vbase + MPC85XX_L2_CAPTECC));
printk(KERN_ERR "L2 Error Attributes Capture Register: 0x%08x\n", pr_err("L2 Error Attributes Capture Register: 0x%08x\n",
in_be32(pdata->l2_vbase + MPC85XX_L2_ERRATTR)); in_be32(pdata->l2_vbase + MPC85XX_L2_ERRATTR));
printk(KERN_ERR "L2 Error Address Capture Register: 0x%08x\n", pr_err("L2 Error Address Capture Register: 0x%08x\n",
in_be32(pdata->l2_vbase + MPC85XX_L2_ERRADDR)); in_be32(pdata->l2_vbase + MPC85XX_L2_ERRADDR));
/* clear error detect register */ /* clear error detect register */
...@@ -599,8 +596,7 @@ static int mpc85xx_l2_err_probe(struct platform_device *op) ...@@ -599,8 +596,7 @@ static int mpc85xx_l2_err_probe(struct platform_device *op)
res = of_address_to_resource(op->dev.of_node, 0, &r); res = of_address_to_resource(op->dev.of_node, 0, &r);
if (res) { if (res) {
printk(KERN_ERR "%s: Unable to get resource for " pr_err("%s: Unable to get resource for L2 err regs\n", __func__);
"L2 err regs\n", __func__);
goto err; goto err;
} }
...@@ -609,15 +605,14 @@ static int mpc85xx_l2_err_probe(struct platform_device *op) ...@@ -609,15 +605,14 @@ static int mpc85xx_l2_err_probe(struct platform_device *op)
if (!devm_request_mem_region(&op->dev, r.start, resource_size(&r), if (!devm_request_mem_region(&op->dev, r.start, resource_size(&r),
pdata->name)) { pdata->name)) {
printk(KERN_ERR "%s: Error while requesting mem region\n", pr_err("%s: Error while requesting mem region\n", __func__);
__func__);
res = -EBUSY; res = -EBUSY;
goto err; goto err;
} }
pdata->l2_vbase = devm_ioremap(&op->dev, r.start, resource_size(&r)); pdata->l2_vbase = devm_ioremap(&op->dev, r.start, resource_size(&r));
if (!pdata->l2_vbase) { if (!pdata->l2_vbase) {
printk(KERN_ERR "%s: Unable to setup L2 err regs\n", __func__); pr_err("%s: Unable to setup L2 err regs\n", __func__);
res = -ENOMEM; res = -ENOMEM;
goto err; goto err;
} }
...@@ -649,16 +644,14 @@ static int mpc85xx_l2_err_probe(struct platform_device *op) ...@@ -649,16 +644,14 @@ static int mpc85xx_l2_err_probe(struct platform_device *op)
mpc85xx_l2_isr, IRQF_SHARED, mpc85xx_l2_isr, IRQF_SHARED,
"[EDAC] L2 err", edac_dev); "[EDAC] L2 err", edac_dev);
if (res < 0) { if (res < 0) {
printk(KERN_ERR pr_err("%s: Unable to request irq %d for MPC85xx L2 err\n",
"%s: Unable to request irq %d for " __func__, pdata->irq);
"MPC85xx L2 err\n", __func__, pdata->irq);
irq_dispose_mapping(pdata->irq); irq_dispose_mapping(pdata->irq);
res = -ENODEV; res = -ENODEV;
goto err2; goto err2;
} }
printk(KERN_INFO EDAC_MOD_STR " acquired irq %d for L2 Err\n", pr_info(EDAC_MOD_STR " acquired irq %d for L2 Err\n", pdata->irq);
pdata->irq);
edac_dev->op_state = OP_RUNNING_INTERRUPT; edac_dev->op_state = OP_RUNNING_INTERRUPT;
...@@ -668,7 +661,7 @@ static int mpc85xx_l2_err_probe(struct platform_device *op) ...@@ -668,7 +661,7 @@ static int mpc85xx_l2_err_probe(struct platform_device *op)
devres_remove_group(&op->dev, mpc85xx_l2_err_probe); devres_remove_group(&op->dev, mpc85xx_l2_err_probe);
edac_dbg(3, "success\n"); edac_dbg(3, "success\n");
printk(KERN_INFO EDAC_MOD_STR " L2 err registered\n"); pr_info(EDAC_MOD_STR " L2 err registered\n");
return 0; return 0;
...@@ -1070,22 +1063,20 @@ static int mpc85xx_mc_err_probe(struct platform_device *op) ...@@ -1070,22 +1063,20 @@ static int mpc85xx_mc_err_probe(struct platform_device *op)
res = of_address_to_resource(op->dev.of_node, 0, &r); res = of_address_to_resource(op->dev.of_node, 0, &r);
if (res) { if (res) {
printk(KERN_ERR "%s: Unable to get resource for MC err regs\n", pr_err("%s: Unable to get resource for MC err regs\n", __func__);
__func__);
goto err; goto err;
} }
if (!devm_request_mem_region(&op->dev, r.start, resource_size(&r), if (!devm_request_mem_region(&op->dev, r.start, resource_size(&r),
pdata->name)) { pdata->name)) {
printk(KERN_ERR "%s: Error while requesting mem region\n", pr_err("%s: Error while requesting mem region\n", __func__);
__func__);
res = -EBUSY; res = -EBUSY;
goto err; goto err;
} }
pdata->mc_vbase = devm_ioremap(&op->dev, r.start, resource_size(&r)); pdata->mc_vbase = devm_ioremap(&op->dev, r.start, resource_size(&r));
if (!pdata->mc_vbase) { if (!pdata->mc_vbase) {
printk(KERN_ERR "%s: Unable to setup MC err regs\n", __func__); pr_err("%s: Unable to setup MC err regs\n", __func__);
res = -ENOMEM; res = -ENOMEM;
goto err; goto err;
} }
...@@ -1093,7 +1084,7 @@ static int mpc85xx_mc_err_probe(struct platform_device *op) ...@@ -1093,7 +1084,7 @@ static int mpc85xx_mc_err_probe(struct platform_device *op)
sdram_ctl = in_be32(pdata->mc_vbase + MPC85XX_MC_DDR_SDRAM_CFG); sdram_ctl = in_be32(pdata->mc_vbase + MPC85XX_MC_DDR_SDRAM_CFG);
if (!(sdram_ctl & DSC_ECC_EN)) { if (!(sdram_ctl & DSC_ECC_EN)) {
/* no ECC */ /* no ECC */
printk(KERN_WARNING "%s: No ECC DIMMs discovered\n", __func__); pr_warn("%s: No ECC DIMMs discovered\n", __func__);
res = -ENODEV; res = -ENODEV;
goto err; goto err;
} }
...@@ -1146,20 +1137,19 @@ static int mpc85xx_mc_err_probe(struct platform_device *op) ...@@ -1146,20 +1137,19 @@ static int mpc85xx_mc_err_probe(struct platform_device *op)
IRQF_SHARED, IRQF_SHARED,
"[EDAC] MC err", mci); "[EDAC] MC err", mci);
if (res < 0) { if (res < 0) {
printk(KERN_ERR "%s: Unable to request irq %d for " pr_err("%s: Unable to request irq %d for MPC85xx DRAM ERR\n",
"MPC85xx DRAM ERR\n", __func__, pdata->irq); __func__, pdata->irq);
irq_dispose_mapping(pdata->irq); irq_dispose_mapping(pdata->irq);
res = -ENODEV; res = -ENODEV;
goto err2; goto err2;
} }
printk(KERN_INFO EDAC_MOD_STR " acquired irq %d for MC\n", pr_info(EDAC_MOD_STR " acquired irq %d for MC\n", pdata->irq);
pdata->irq);
} }
devres_remove_group(&op->dev, mpc85xx_mc_err_probe); devres_remove_group(&op->dev, mpc85xx_mc_err_probe);
edac_dbg(3, "success\n"); edac_dbg(3, "success\n");
printk(KERN_INFO EDAC_MOD_STR " MC err registered\n"); pr_info(EDAC_MOD_STR " MC err registered\n");
return 0; return 0;
...@@ -1241,8 +1231,7 @@ static int __init mpc85xx_mc_init(void) ...@@ -1241,8 +1231,7 @@ static int __init mpc85xx_mc_init(void)
int res = 0; int res = 0;
u32 __maybe_unused pvr = 0; u32 __maybe_unused pvr = 0;
printk(KERN_INFO "Freescale(R) MPC85xx EDAC driver, " pr_info("Freescale(R) MPC85xx EDAC driver, (C) 2006 Montavista Software\n");
"(C) 2006 Montavista Software\n");
/* make sure error reporting method is sane */ /* make sure error reporting method is sane */
switch (edac_op_state) { switch (edac_op_state) {
...@@ -1256,7 +1245,7 @@ static int __init mpc85xx_mc_init(void) ...@@ -1256,7 +1245,7 @@ static int __init mpc85xx_mc_init(void)
res = platform_register_drivers(drivers, ARRAY_SIZE(drivers)); res = platform_register_drivers(drivers, ARRAY_SIZE(drivers));
if (res) if (res)
printk(KERN_WARNING EDAC_MOD_STR "drivers fail to register\n"); pr_warn(EDAC_MOD_STR "drivers fail to register\n");
return 0; return 0;
} }
......
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