From: Joe Schaack <jscha...@xes-inc.com> Modify the nand_davinci_write_page() function to use ECC when appropriate to verify writes. Previously if a single bit error occured and software ECC was used the write verification would report a failure. However, the write really did succeed, since ECC can handle the error.
Signed-off-by: Joe Schaack <jscha...@xes-inc.com> Signed-off-by: Peter Tyser <pty...@xes-inc.com> --- I don't have davinci hardware to test on, but the change should mirror the nand_base.c change. drivers/mtd/nand/davinci_nand.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c index b4e22d1..cd0b07c 100644 --- a/drivers/mtd/nand/davinci_nand.c +++ b/drivers/mtd/nand/davinci_nand.c @@ -415,7 +415,10 @@ static int nand_davinci_write_page(struct mtd_info *mtd, struct nand_chip *chip, /* Send command to read back the data */ chip->cmdfunc(mtd, NAND_CMD_READ0, 0, page); - chip->ecc.read_page_raw(mtd, chip, vfy_buf, oob_required, page); + if (unlikely(raw)) + chip->ecc.read_page_raw(mtd, chip, vfy_buf, oob_required, page); + else + chip->ecc.read_page(mtd, chip, vfy_buf, oob_required, page); if (memcmp(buf, vfy_buf, mtd->writesize)) ret = -EIO; -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot