From patchwork Fri Apr 29 10:31:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3/3] omap : nand : fix subpage ecc issue with prefetch Date: Fri, 29 Apr 2011 00:31:10 -0000 From: Bryan DE FARIA X-Patchwork-Id: 93414 Message-Id: <1304073070-24526-4-git-send-email-bdefaria@adeneo-embedded.com> To: Cc: Bryan DE FARIA , jjhiblot@adetelgroup.com, linux-mtd@lists.infradead.org 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 --- 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;