From: leiwen@marvell.com (Lei Wen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] MTD: pxa3xx_nand: convert all printk into dev_*
Date: Thu, 7 Jul 2011 20:34:42 -0700 [thread overview]
Message-ID: <1310096084-14646-2-git-send-email-leiwen@marvell.com> (raw)
In-Reply-To: <1309771536-10597-1-git-send-email-leiwen@marvell.com>
Signed-off-by: Lei Wen <leiwen@marvell.com>
---
drivers/mtd/nand/pxa3xx_nand.c | 27 ++++++++++++++++-----------
1 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index b7db1b2..043c0bb 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -359,7 +359,7 @@ static void handle_data_pio(struct pxa3xx_nand_info *info)
DIV_ROUND_UP(info->oob_size, 4));
break;
default:
- printk(KERN_ERR "%s: invalid state %d\n", __func__,
+ dev_err(&info->pdev->dev, "%s: invalid state %d\n", __func__,
info->state);
BUG();
}
@@ -385,7 +385,7 @@ static void start_data_dma(struct pxa3xx_nand_info *info)
desc->dcmd |= DCMD_INCTRGADDR | DCMD_FLOWSRC;
break;
default:
- printk(KERN_ERR "%s: invalid state %d\n", __func__,
+ dev_err(&info->pdev->dev, "%s: invalid state %d\n", __func__,
info->state);
BUG();
}
@@ -616,8 +616,8 @@ static int prepare_command_pool(struct pxa3xx_nand_info *info, int command,
default:
exec_cmd = 0;
- printk(KERN_ERR "pxa3xx-nand: non-supported"
- " command %x\n", command);
+ dev_err(&info->pdev->dev, "non-supported command %x\n",
+ command);
break;
}
@@ -646,7 +646,7 @@ static void pxa3xx_nand_cmdfunc(struct mtd_info *mtd, unsigned command,
ret = wait_for_completion_timeout(&info->cmd_complete,
CHIP_DELAY_TIMEOUT);
if (!ret) {
- printk(KERN_ERR "Wait time out!!!\n");
+ dev_err(&info->pdev->dev, "Wait time out!!!\n");
/* Stop State Machine for next command cycle */
pxa3xx_nand_stop(info);
}
@@ -774,11 +774,15 @@ static int pxa3xx_nand_config_flash(struct pxa3xx_nand_info *info,
struct pxa3xx_nand_platform_data *pdata = pdev->dev.platform_data;
uint32_t ndcr = 0x0; /* enable all interrupts */
- if (f->page_size != 2048 && f->page_size != 512)
+ if (f->page_size != 2048 && f->page_size != 512) {
+ dev_err(&pdev->dev, "Current only support 2048 and 512 size\n");
return -EINVAL;
+ }
- if (f->flash_width != 16 && f->flash_width != 8)
+ if (f->flash_width != 16 && f->flash_width != 8) {
+ dev_err(&pdev->dev, "Only support 8bit and 16 bit!\n");
return -EINVAL;
+ }
/* calculate flash information */
info->cmdset = &default_cmdset;
@@ -898,7 +902,7 @@ static int pxa3xx_nand_scan(struct mtd_info *mtd)
if (!ret) {
kfree(mtd);
info->mtd = NULL;
- printk(KERN_INFO "There is no nand chip on cs 0!\n");
+ dev_info(&info->pdev->dev, "There is no nand chip on cs 0!\n");
return -EINVAL;
}
@@ -906,11 +910,12 @@ static int pxa3xx_nand_scan(struct mtd_info *mtd)
chip->cmdfunc(mtd, NAND_CMD_READID, 0, 0);
id = *((uint16_t *)(info->data_buff));
if (id != 0)
- printk(KERN_INFO "Detect a flash id %x\n", id);
+ dev_info(&info->pdev->dev, "Detect a flash id %x\n", id);
else {
kfree(mtd);
info->mtd = NULL;
- printk(KERN_WARNING "Read out ID 0, potential timing set wrong!!\n");
+ dev_warn(&info->pdev->dev, "Read out ID 0, "
+ "potential timing set wrong!!\n");
return -EINVAL;
}
@@ -930,7 +935,7 @@ static int pxa3xx_nand_scan(struct mtd_info *mtd)
if (i >= (ARRAY_SIZE(builtin_flash_types) + pdata->num_flash - 1)) {
kfree(mtd);
info->mtd = NULL;
- printk(KERN_ERR "ERROR!! flash not defined!!!\n");
+ dev_err(&info->pdev->dev, "ERROR!! flash not defined!!!\n");
return -EINVAL;
}
--
1.7.0.4
next prev parent reply other threads:[~2011-07-08 3:34 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-08 16:00 [PATCH] MTD: pxa3xx_nand: enable multiple chip select support Lei Wen
2011-06-22 11:39 ` Daniel Mack
2011-07-08 17:38 ` Lei Wen
2011-06-22 13:06 ` Daniel Mack
2011-06-23 6:22 ` Lei Wen
2011-07-08 16:09 ` Igor Grinberg
2011-07-08 15:26 ` Lei Wen
2011-06-23 10:44 ` Igor Grinberg
2011-06-25 11:17 ` Lei Wen
2011-06-25 12:32 ` Daniel Mack
2011-06-25 12:51 ` Lei Wen
2011-06-27 13:22 ` Igor Grinberg
2011-06-28 7:32 ` Artem Bityutskiy
2011-06-28 15:12 ` Lei Wen
2011-06-29 3:51 ` [PATCH V3 0/9] pxa3xx_nand: add two " Lei Wen
2011-06-29 9:00 ` Igor Grinberg
2011-06-29 10:20 ` Artem Bityutskiy
2011-07-04 9:27 ` Lei Wen
2011-07-04 9:25 ` [PATCH V4 0/4] " Lei Wen
2011-07-08 3:34 ` [PATCH V5 0/3] " Lei Wen
2011-07-12 10:28 ` [PATCH V6 0/4] " Lei Wen
2011-07-12 14:35 ` [PATCH V7 " Lei Wen
2011-07-15 3:44 ` [PATCH V8 " Lei Wen
2011-07-20 4:51 ` Artem Bityutskiy
2011-07-15 3:44 ` [PATCH V8 1/4] MTD: pxa3xx_nand: enhance suspend and resume routine Lei Wen
2011-07-15 3:44 ` [PATCH V8 2/4] MTD: pxa3xx_nand: convert all printk into dev_* Lei Wen
2011-07-15 3:44 ` [PATCH V8 3/4] MTD: pxa3xx_nand: sperate each chip individual info Lei Wen
2011-07-15 3:44 ` [PATCH V8 4/4] MTD: pxa3xx_nand: enable multiple chip select support Lei Wen
2011-07-12 14:35 ` [PATCH V7 1/4] MTD: pxa3xx_nand: enhance suspend and resume routine Lei Wen
2011-07-13 10:53 ` Sergei Shtylyov
2011-07-12 14:35 ` [PATCH V7 2/4] MTD: pxa3xx_nand: convert all printk into dev_* Lei Wen
2011-07-13 10:57 ` Sergei Shtylyov
2011-07-13 12:41 ` Lei Wen
2011-07-13 14:35 ` Sergei Shtylyov
2011-07-12 14:35 ` [PATCH V7 3/4] MTD: pxa3xx_nand: sperate each chip individual info Lei Wen
2011-07-12 14:35 ` [PATCH V7 4/4] MTD: pxa3xx_nand: enable multiple chip select support Lei Wen
2011-07-12 10:28 ` [PATCH V6 1/4] MTD: pxa3xx_nand: convert all printk into dev_* Lei Wen
2011-07-12 10:28 ` [PATCH V6 2/4] MTD: pxa3xx_nand: sperate each chip individual info Lei Wen
2011-07-12 10:28 ` [PATCH V6 3/4] MTD: pxa3xx_nand: enable multiple chip select support Lei Wen
2011-07-12 10:28 ` [PATCH V6 4/4] MTD: pxa3xx_nand: enhance suspend and resume routine Lei Wen
2011-07-12 11:39 ` Daniel Mack
2011-07-12 12:02 ` Daniel Mack
2011-07-12 15:56 ` Igor Grinberg
2011-07-12 17:35 ` Daniel Mack
2011-07-08 3:34 ` Lei Wen [this message]
2011-07-08 3:34 ` [PATCH 2/3] MTD: pxa3xx_nand: sperate each chip individual info Lei Wen
2011-07-08 3:34 ` [PATCH 3/3] MTD: pxa3xx_nand: enable multiple chip select support Lei Wen
2011-07-04 9:25 ` [PATCH 1/4] MTD: pxa3xx_nand: convert all printk into dev_* Lei Wen
2011-07-04 9:25 ` [PATCH 2/4] MTD: pxa3xx_nand: sperate each chip individual info Lei Wen
2011-07-06 7:29 ` Igor Grinberg
2011-07-04 9:25 ` [PATCH 3/4] MTD: pxa3xx_nand: enable multiple chip select support Lei Wen
2011-07-06 6:53 ` Artem Bityutskiy
2011-07-06 6:54 ` Lei Wen
2011-07-06 7:07 ` Artem Bityutskiy
2011-07-06 7:41 ` Igor Grinberg
2011-07-07 6:26 ` Lei Wen
2011-07-07 8:59 ` Igor Grinberg
2011-07-07 9:06 ` Lei Wen
2011-07-07 11:23 ` Igor Grinberg
2011-07-11 14:49 ` Daniel Mack
2011-07-11 18:19 ` Igor Grinberg
2011-07-11 18:53 ` Daniel Mack
2011-07-11 19:25 ` Igor Grinberg
2011-07-12 9:40 ` Lei Wen
2011-07-12 9:57 ` Daniel Mack
2011-07-12 10:29 ` Lei Wen
2011-07-12 12:05 ` Daniel Mack
2011-07-12 12:48 ` Daniel Mack
2011-07-12 15:49 ` Igor Grinberg
2011-07-04 9:25 ` [PATCH 4/4] ARM: mmp/pxa: fix nand platform data Lei Wen
2011-06-29 3:51 ` [PATCH 1/9] MTD: pxa3xx_nand: convert all printk into dev_* Lei Wen
2011-06-29 3:51 ` [PATCH 2/9] MTD: pxa3xx_nand: enable multiple chip select support Lei Wen
2011-06-29 7:11 ` Artem Bityutskiy
2011-06-29 7:16 ` Lei Wen
2011-06-29 3:51 ` [PATCH 3/9] ARM: aspenite: fix nand platform data Lei Wen
2011-06-29 3:51 ` [PATCH 4/9] ARM: cm-x300: " Lei Wen
2011-06-29 3:51 ` [PATCH 5/9] ARM: colibri-pxa3xx: " Lei Wen
2011-06-29 3:51 ` [PATCH 6/9] ARM: littleton: " Lei Wen
2011-06-29 3:51 ` [PATCH 7/9] ARM: mxm8x10: " Lei Wen
2011-06-29 3:51 ` [PATCH 8/9] ARM: raumfeld: " Lei Wen
2011-06-29 3:51 ` [PATCH 9/9] ARM: zylonite: " Lei Wen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1310096084-14646-2-git-send-email-leiwen@marvell.com \
--to=leiwen@marvell.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).