dfu: nand: Verify writes
authorPeter Tyser <ptyser@xes-inc.com>
Tue, 3 Feb 2015 17:58:14 +0000 (11:58 -0600)
committerScott Wood <scottwood@freescale.com>
Tue, 31 Mar 2015 04:24:38 +0000 (23:24 -0500)
Previously NAND writes were not verified and could fail silently.  Add
a verification step after all writes to NAND.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Heiko Schocher <hs@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
drivers/dfu/dfu_nand.c

index f9ee18999ab76974e06afcc46f84a149ac56c768..a9754922e8d63ec4df950dd7c947bf189090c086 100644 (file)
@@ -64,7 +64,7 @@ static int nand_block_op(enum dfu_op op, struct dfu_entity *dfu,
                        return ret;
                /* then write */
                ret = nand_write_skip_bad(nand, start, &count, &actual,
-                               lim, buf, 0);
+                               lim, buf, WITH_WR_VERIFY);
        }
 
        if (ret != 0) {