pxa3xx_nand: reset read buffer before reading
authorHaojian Zhuang <haojian.zhuang@marvell.com>
Mon, 14 Sep 2009 12:21:01 +0000 (20:21 +0800)
committerEric Miao <eric.y.miao@gmail.com>
Tue, 1 Dec 2009 01:02:37 +0000 (09:02 +0800)
Initialize the read buffer content to 0xFF.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
drivers/mtd/nand/pxa3xx_nand.c

index f463ad2..9140fdc 100644 (file)
@@ -670,6 +670,7 @@ static void pxa3xx_nand_cmdfunc(struct mtd_info *mtd, unsigned command,
                /* disable HW ECC to get all the OOB data */
                info->buf_count = mtd->writesize + mtd->oobsize;
                info->buf_start = mtd->writesize + column;
+               memset(info->data_buff, 0xFF, info->buf_count);
 
                if (prepare_read_prog_cmd(info, cmdset->read1, column, page_addr))
                        break;