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

Bryan DE FARIA bdefaria at adeneo-embedded.com
Fri Apr 29 06:31:10 EDT 2011


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 at adeneo-embedded.com>
---
 drivers/mtd/nand/omap2.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

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;
-- 
1.7.1




More information about the linux-mtd mailing list