Commit 0a7ff7c7 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

msm_sdcc.c: convert printk(KERN_<level> to pr_<level>(

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Brian Swetland <swetland@google.com>
Cc: Pierre Ossman <drzeus-list@drzeus.cx>
Cc: San Mehat <san@android.com>
Cc: Matt Fleming <matt@console-pimps.org>
Cc: Ian Molton <ian@mnementh.co.uk>
Cc: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Cc: Philip Langdale <philipl@overt.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9d2bd738
...@@ -127,7 +127,7 @@ msmsdcc_dma_complete_func(struct msm_dmov_cmd *cmd, ...@@ -127,7 +127,7 @@ msmsdcc_dma_complete_func(struct msm_dmov_cmd *cmd,
BUG_ON(!mrq); BUG_ON(!mrq);
if (!(result & DMOV_RSLT_VALID)) { if (!(result & DMOV_RSLT_VALID)) {
printk(KERN_ERR "msmsdcc: Invalid DataMover result\n"); pr_err("msmsdcc: Invalid DataMover result\n");
goto out; goto out;
} }
...@@ -136,14 +136,13 @@ msmsdcc_dma_complete_func(struct msm_dmov_cmd *cmd, ...@@ -136,14 +136,13 @@ msmsdcc_dma_complete_func(struct msm_dmov_cmd *cmd,
} else { } else {
/* Error or flush */ /* Error or flush */
if (result & DMOV_RSLT_ERROR) if (result & DMOV_RSLT_ERROR)
printk(KERN_ERR "%s: DMA error (0x%.8x)\n", pr_err("%s: DMA error (0x%.8x)\n",
mmc_hostname(host->mmc), result); mmc_hostname(host->mmc), result);
if (result & DMOV_RSLT_FLUSH) if (result & DMOV_RSLT_FLUSH)
printk(KERN_ERR "%s: DMA channel flushed (0x%.8x)\n", pr_err("%s: DMA channel flushed (0x%.8x)\n",
mmc_hostname(host->mmc), result); mmc_hostname(host->mmc), result);
if (err) if (err)
printk(KERN_ERR pr_err("Flush data: %.8x %.8x %.8x %.8x %.8x %.8x\n",
"Flush data: %.8x %.8x %.8x %.8x %.8x %.8x\n",
err->flush[0], err->flush[1], err->flush[2], err->flush[0], err->flush[1], err->flush[2],
err->flush[3], err->flush[4], err->flush[5]); err->flush[3], err->flush[4], err->flush[5]);
if (!mrq->data->error) if (!mrq->data->error)
...@@ -248,7 +247,7 @@ static int msmsdcc_config_dma(struct msmsdcc_host *host, struct mmc_data *data) ...@@ -248,7 +247,7 @@ static int msmsdcc_config_dma(struct msmsdcc_host *host, struct mmc_data *data)
host->dma.num_ents, host->dma.dir); host->dma.num_ents, host->dma.dir);
if (n != host->dma.num_ents) { if (n != host->dma.num_ents) {
printk(KERN_ERR "%s: Unable to map in all sg elements\n", pr_err("%s: Unable to map in all sg elements\n",
mmc_hostname(host->mmc)); mmc_hostname(host->mmc));
host->dma.sg = NULL; host->dma.sg = NULL;
host->dma.num_ents = 0; host->dma.num_ents = 0;
...@@ -393,25 +392,24 @@ msmsdcc_data_err(struct msmsdcc_host *host, struct mmc_data *data, ...@@ -393,25 +392,24 @@ msmsdcc_data_err(struct msmsdcc_host *host, struct mmc_data *data,
unsigned int status) unsigned int status)
{ {
if (status & MCI_DATACRCFAIL) { if (status & MCI_DATACRCFAIL) {
printk(KERN_ERR "%s: Data CRC error\n", pr_err("%s: Data CRC error\n", mmc_hostname(host->mmc));
mmc_hostname(host->mmc)); pr_err("%s: opcode 0x%.8x\n", __func__,
printk(KERN_ERR "%s: opcode 0x%.8x\n", __func__,
data->mrq->cmd->opcode); data->mrq->cmd->opcode);
printk(KERN_ERR "%s: blksz %d, blocks %d\n", __func__, pr_err("%s: blksz %d, blocks %d\n", __func__,
data->blksz, data->blocks); data->blksz, data->blocks);
data->error = -EILSEQ; data->error = -EILSEQ;
} else if (status & MCI_DATATIMEOUT) { } else if (status & MCI_DATATIMEOUT) {
printk(KERN_ERR "%s: Data timeout\n", mmc_hostname(host->mmc)); pr_err("%s: Data timeout\n", mmc_hostname(host->mmc));
data->error = -ETIMEDOUT; data->error = -ETIMEDOUT;
} else if (status & MCI_RXOVERRUN) { } else if (status & MCI_RXOVERRUN) {
printk(KERN_ERR "%s: RX overrun\n", mmc_hostname(host->mmc)); pr_err("%s: RX overrun\n", mmc_hostname(host->mmc));
data->error = -EIO; data->error = -EIO;
} else if (status & MCI_TXUNDERRUN) { } else if (status & MCI_TXUNDERRUN) {
printk(KERN_ERR "%s: TX underrun\n", mmc_hostname(host->mmc)); pr_err("%s: TX underrun\n", mmc_hostname(host->mmc));
data->error = -EIO; data->error = -EIO;
} else { } else {
printk(KERN_ERR "%s: Unknown error (0x%.8x)\n", pr_err("%s: Unknown error (0x%.8x)\n",
mmc_hostname(host->mmc), status); mmc_hostname(host->mmc), status);
data->error = -EIO; data->error = -EIO;
} }
} }
...@@ -566,8 +564,7 @@ static void msmsdcc_do_cmdirq(struct msmsdcc_host *host, uint32_t status) ...@@ -566,8 +564,7 @@ static void msmsdcc_do_cmdirq(struct msmsdcc_host *host, uint32_t status)
cmd->error = -ETIMEDOUT; cmd->error = -ETIMEDOUT;
} else if (status & MCI_CMDCRCFAIL && } else if (status & MCI_CMDCRCFAIL &&
cmd->flags & MMC_RSP_CRC) { cmd->flags & MMC_RSP_CRC) {
printk(KERN_ERR "%s: Command CRC error\n", pr_err("%s: Command CRC error\n", mmc_hostname(host->mmc));
mmc_hostname(host->mmc));
cmd->error = -EILSEQ; cmd->error = -EILSEQ;
} }
...@@ -759,8 +756,8 @@ msmsdcc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) ...@@ -759,8 +756,8 @@ msmsdcc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
if (ios->clock != host->clk_rate) { if (ios->clock != host->clk_rate) {
rc = clk_set_rate(host->clk, ios->clock); rc = clk_set_rate(host->clk, ios->clock);
if (rc < 0) if (rc < 0)
printk(KERN_ERR pr_err("%s: Error setting clock rate (%d)\n",
"Error setting clock rate (%d)\n", rc); mmc_hostname(host->mmc), rc);
else else
host->clk_rate = ios->clock; host->clk_rate = ios->clock;
} }
...@@ -848,9 +845,8 @@ msmsdcc_check_status(unsigned long data) ...@@ -848,9 +845,8 @@ msmsdcc_check_status(unsigned long data)
status = host->plat->status(mmc_dev(host->mmc)); status = host->plat->status(mmc_dev(host->mmc));
host->eject = !status; host->eject = !status;
if (status ^ host->oldstat) { if (status ^ host->oldstat) {
printk(KERN_INFO pr_info("%s: Slot status change detected (%d -> %d)\n",
"%s: Slot status change detected (%d -> %d)\n", mmc_hostname(host->mmc), host->oldstat, status);
mmc_hostname(host->mmc), host->oldstat, status);
if (status) if (status)
mmc_detect_change(host->mmc, (5 * HZ) / 2); mmc_detect_change(host->mmc, (5 * HZ) / 2);
else else
...@@ -900,13 +896,13 @@ msmsdcc_command_expired(unsigned long _data) ...@@ -900,13 +896,13 @@ msmsdcc_command_expired(unsigned long _data)
mrq = host->curr.mrq; mrq = host->curr.mrq;
if (!mrq) { if (!mrq) {
printk(KERN_INFO "%s: Command expiry misfire\n", pr_info("%s: Command expiry misfire\n",
mmc_hostname(host->mmc)); mmc_hostname(host->mmc));
spin_unlock_irqrestore(&host->lock, flags); spin_unlock_irqrestore(&host->lock, flags);
return; return;
} }
printk(KERN_ERR "%s: Command timeout (%p %p %p %p)\n", pr_err("%s: Command timeout (%p %p %p %p)\n",
mmc_hostname(host->mmc), mrq, mrq->cmd, mmc_hostname(host->mmc), mrq, mrq->cmd,
mrq->data, host->dma.sg); mrq->data, host->dma.sg);
...@@ -937,7 +933,7 @@ msmsdcc_init_dma(struct msmsdcc_host *host) ...@@ -937,7 +933,7 @@ msmsdcc_init_dma(struct msmsdcc_host *host)
&host->dma.nc_busaddr, &host->dma.nc_busaddr,
GFP_KERNEL); GFP_KERNEL);
if (host->dma.nc == NULL) { if (host->dma.nc == NULL) {
printk(KERN_ERR "Unable to allocate DMA buffer\n"); pr_err("Unable to allocate DMA buffer\n");
return -ENOMEM; return -ENOMEM;
} }
memset(host->dma.nc, 0x00, sizeof(struct msmsdcc_nc_dmadata)); memset(host->dma.nc, 0x00, sizeof(struct msmsdcc_nc_dmadata));
...@@ -980,7 +976,7 @@ msmsdcc_probe(struct platform_device *pdev) ...@@ -980,7 +976,7 @@ msmsdcc_probe(struct platform_device *pdev)
/* must have platform data */ /* must have platform data */
if (!plat) { if (!plat) {
printk(KERN_ERR "%s: Platform data not available\n", __func__); pr_err("%s: Platform data not available\n", __func__);
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
} }
...@@ -989,7 +985,7 @@ msmsdcc_probe(struct platform_device *pdev) ...@@ -989,7 +985,7 @@ msmsdcc_probe(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
if (pdev->resource == NULL || pdev->num_resources < 2) { if (pdev->resource == NULL || pdev->num_resources < 2) {
printk(KERN_ERR "%s: Invalid resource\n", __func__); pr_err("%s: Invalid resource\n", __func__);
return -ENXIO; return -ENXIO;
} }
...@@ -1003,7 +999,7 @@ msmsdcc_probe(struct platform_device *pdev) ...@@ -1003,7 +999,7 @@ msmsdcc_probe(struct platform_device *pdev)
"status_irq"); "status_irq");
if (!cmd_irqres || !pio_irqres || !memres) { if (!cmd_irqres || !pio_irqres || !memres) {
printk(KERN_ERR "%s: Invalid resource\n", __func__); pr_err("%s: Invalid resource\n", __func__);
return -ENXIO; return -ENXIO;
} }
...@@ -1071,8 +1067,7 @@ msmsdcc_probe(struct platform_device *pdev) ...@@ -1071,8 +1067,7 @@ msmsdcc_probe(struct platform_device *pdev)
ret = clk_set_rate(host->clk, msmsdcc_fmin); ret = clk_set_rate(host->clk, msmsdcc_fmin);
if (ret) { if (ret) {
printk(KERN_ERR "%s: Clock rate set failed (%d)\n", pr_err("%s: Clock rate set failed (%d)\n", __func__, ret);
__func__, ret);
goto clk_disable; goto clk_disable;
} }
...@@ -1125,14 +1120,14 @@ msmsdcc_probe(struct platform_device *pdev) ...@@ -1125,14 +1120,14 @@ msmsdcc_probe(struct platform_device *pdev)
DRIVER_NAME " (slot)", DRIVER_NAME " (slot)",
host); host);
if (ret) { if (ret) {
printk(KERN_ERR "Unable to get slot IRQ %d (%d)\n", pr_err("%s: Unable to get slot IRQ %d (%d)\n",
host->stat_irq, ret); mmc_hostname(mmc), host->stat_irq, ret);
goto clk_disable; goto clk_disable;
} }
} else if (plat->register_status_notify) { } else if (plat->register_status_notify) {
plat->register_status_notify(msmsdcc_status_notify_cb, host); plat->register_status_notify(msmsdcc_status_notify_cb, host);
} else if (!plat->status) } else if (!plat->status)
printk(KERN_ERR "%s: No card detect facilities available\n", pr_err("%s: No card detect facilities available\n",
mmc_hostname(mmc)); mmc_hostname(mmc));
else { else {
init_timer(&host->timer); init_timer(&host->timer);
...@@ -1168,34 +1163,28 @@ msmsdcc_probe(struct platform_device *pdev) ...@@ -1168,34 +1163,28 @@ msmsdcc_probe(struct platform_device *pdev)
mmc_set_drvdata(pdev, mmc); mmc_set_drvdata(pdev, mmc);
mmc_add_host(mmc); mmc_add_host(mmc);
printk(KERN_INFO pr_info("%s: Qualcomm MSM SDCC at 0x%016llx irq %d,%d dma %d\n",
"%s: Qualcomm MSM SDCC at 0x%016llx irq %d,%d dma %d\n", mmc_hostname(mmc), (unsigned long long)memres->start,
mmc_hostname(mmc), (unsigned long long)memres->start, (unsigned int) cmd_irqres->start,
(unsigned int) cmd_irqres->start, (unsigned int) host->stat_irq, host->dma.channel);
(unsigned int) host->stat_irq, host->dma.channel); pr_info("%s: 4 bit data mode %s\n", mmc_hostname(mmc),
printk(KERN_INFO "%s: 4 bit data mode %s\n", mmc_hostname(mmc), (mmc->caps & MMC_CAP_4_BIT_DATA ? "enabled" : "disabled"));
(mmc->caps & MMC_CAP_4_BIT_DATA ? "enabled" : "disabled")); pr_info("%s: MMC clock %u -> %u Hz, PCLK %u Hz\n",
printk(KERN_INFO "%s: MMC clock %u -> %u Hz, PCLK %u Hz\n", mmc_hostname(mmc), msmsdcc_fmin, msmsdcc_fmax, host->pclk_rate);
mmc_hostname(mmc), msmsdcc_fmin, msmsdcc_fmax, host->pclk_rate); pr_info("%s: Slot eject status = %d\n", mmc_hostname(mmc), host->eject);
printk(KERN_INFO "%s: Slot eject status = %d\n", mmc_hostname(mmc), pr_info("%s: Power save feature enable = %d\n",
host->eject); mmc_hostname(mmc), msmsdcc_pwrsave);
printk(KERN_INFO "%s: Power save feature enable = %d\n",
mmc_hostname(mmc), msmsdcc_pwrsave);
if (host->dma.channel != -1) { if (host->dma.channel != -1) {
printk(KERN_INFO pr_info("%s: DM non-cached buffer at %p, dma_addr 0x%.8x\n",
"%s: DM non-cached buffer at %p, dma_addr 0x%.8x\n", mmc_hostname(mmc), host->dma.nc, host->dma.nc_busaddr);
mmc_hostname(mmc), host->dma.nc, host->dma.nc_busaddr); pr_info("%s: DM cmd busaddr 0x%.8x, cmdptr busaddr 0x%.8x\n",
printk(KERN_INFO mmc_hostname(mmc), host->dma.cmd_busaddr,
"%s: DM cmd busaddr 0x%.8x, cmdptr busaddr 0x%.8x\n", host->dma.cmdptr_busaddr);
mmc_hostname(mmc), host->dma.cmd_busaddr,
host->dma.cmdptr_busaddr);
} else } else
printk(KERN_INFO pr_info("%s: PIO transfer enabled\n", mmc_hostname(mmc));
"%s: PIO transfer enabled\n", mmc_hostname(mmc));
if (host->timer.function) if (host->timer.function)
printk(KERN_INFO "%s: Polling status mode enabled\n", pr_info("%s: Polling status mode enabled\n", mmc_hostname(mmc));
mmc_hostname(mmc));
return 0; return 0;
cmd_irq_free: cmd_irq_free:
......
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