diff mbox

[3/3] omap : nand : fix subpage ecc issue with prefetch

Message ID 1304073070-24526-4-git-send-email-bdefaria@adeneo-embedded.com
State New, archived
Headers show

Commit Message

Bryan DE FARIA April 29, 2011, 10:31 a.m. UTC
When reading a subpage with a non dividable by 4 ecc number of byte, the
prefetch function gets first the extra bytes, then reads the bytes lefting.
Extra bytes are not returned in the buffer (they are overwritten), which makes
the software ecc fail.

Signed-off-by: Bryan DE FARIA <bdefaria@adeneo-embedded.com>
---
 drivers/mtd/nand/omap2.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Comments

vimal singh April 29, 2011, 4 p.m. UTC | #1
On Fri, Apr 29, 2011 at 4:01 PM, Bryan DE FARIA
<bdefaria@adeneo-embedded.com> wrote:
> When reading a subpage with a non dividable by 4 ecc number of byte, the
> prefetch function gets first the extra bytes, then reads the bytes lefting.
> Extra bytes are not returned in the buffer (they are overwritten), which makes
> the software ecc fail.

Its not only read, write too is broken for the same reason. More ever,
it is broken for
other path too (failing to enable prefetch engine path).
diff mbox

Patch

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index eab51da..728db14 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -267,7 +267,6 @@  static void omap_read_buf_pref(struct mtd_info *mtd, u_char *buf, int len)
 		else
 			omap_read_buf8(mtd, buf, len);
 	} else {
-		p = (u32 *) buf;
 		do {
 			r_count = gpmc_read_status(GPMC_PREFETCH_FIFO_CNT);
 			r_count = r_count >> 2;