From: leiwen@marvell.com (Lei Wen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 29/29] pxa3xx_nand: new read oob logic only works with
Date: Tue, 13 Jul 2010 21:10:32 +0800 [thread overview]
Message-ID: <mailman.150.1280297160.27306.linux-arm-kernel@lists.infradead.org> (raw)
new silicon
Signed-off-by: Lei Wen <leiwen@marvell.com>
---
drivers/mtd/nand/pxa3xx_nand.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index bc2f56d..068232c 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -360,6 +360,8 @@ static void pxa3xx_nand_set_timing(struct
pxa3xx_nand_info *info,
static void pxa3xx_set_datasize(struct pxa3xx_nand_info *info)
{
struct pxa3xx_nand *nand = info->nand_data;
+ struct platform_device *pdev = nand->pdev;
+ struct pxa3xx_nand_platform_data *pdata = pdev->dev.platform_data;
int oob_enable = info->reg_ndcr & NDCR_SPARE_EN;
if (info->page_size < PAGE_CHUNK_SIZE) {
@@ -388,7 +390,10 @@ static void pxa3xx_set_datasize(struct
pxa3xx_nand_info *info)
return;
}
- if (nand->command == NAND_CMD_READOOB) {
+ if (nand->command == NAND_CMD_READOOB
+ && pdata->controller_attrs & PXA3XX_NAKED_CMD_EN) {
+ /* This special handle read oob method can only be used
+ * with silicon support naked command*/
switch (info->ecc_strength) {
case HAMMING_STRENGTH:
nand->ndcb1[3] = 2 * PAGE_CHUNK_SIZE + OOB_CHUNK_SIZE;
--
1.7.0.4
reply other threads:[~2010-07-13 13:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=mailman.150.1280297160.27306.linux-arm-kernel@lists.infradead.org \
--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).