From: David Brownell <david-b@pacbell.net>
To: davinci-linux-open-source@linux.davincidsp.com
Cc: linux-mtd@lists.infradead.org, tglx@linutronix.de,
nsnehaprabha@ti.com, dwmw2@infradead.org,
akpm@linux-foundation.org
Subject: Re: [PATCH v3 3/3] mtd-nand: DaVinci: Add 4-bit ECC support for large page NAND chips
Date: Fri, 17 Jul 2009 12:32:53 -0700 [thread overview]
Message-ID: <200907171232.53725.david-b@pacbell.net> (raw)
In-Reply-To: <1247781590-11323-1-git-send-email-nsnehaprabha@ti.com>
On Thursday 16 July 2009, nsnehaprabha@ti.com wrote:
> It also fixes a bug in the ECC correction handler.
> When we introduce 5 bit-errors in chunk, error correction stops working. When
> errors are detected the 4BITECC_START bit was left high, which should be
> cleared.
Agreed that needs to be fixed, but there should be a comment
about this being an *undocumented* behavior in the hardware.
The reason that the bug exists at all is because this step
has never been documented. So, please roll in this update.
- Dave
---
drivers/mtd/nand/davinci_nand.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -350,13 +350,16 @@ compare:
/*
* Clear any previous address calculation by doing a dummy read of an
- * error address register.
+ * error address register. UNDOCUMENTED that the ECC engine won't
+ * recover after 5-bit ECC errors without this step.
*/
davinci_nand_readl(info, NAND_ERR_ADD1_OFFSET);
/* Start address calculation, and wait for it to complete.
* We _could_ start reading more data while this is working,
- * to speed up the overall page read.
+ * to speed up the overall page read. UNDOCUMENTED that
+ * reading some ERRVAL register is needed in all cases, not
+ * just when an error must be corrected.
*/
davinci_nand_writel(info, NANDFCR_OFFSET,
davinci_nand_readl(info, NANDFCR_OFFSET) | BIT(13));
next prev parent reply other threads:[~2009-07-17 19:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-16 21:59 [PATCH v3 3/3] mtd-nand: DaVinci: Add 4-bit ECC support for large page NAND chips nsnehaprabha
2009-07-16 23:56 ` Troy Kisky
2009-07-17 14:31 ` Narnakaje, Snehaprabha
2009-07-17 19:32 ` David Brownell [this message]
2009-07-17 20:18 ` Narnakaje, Snehaprabha
2009-07-17 21:18 ` David Brownell
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=200907171232.53725.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=akpm@linux-foundation.org \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=nsnehaprabha@ti.com \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.