]> git.sur5r.net Git - u-boot/commitdiff
NAND Flash verify across block boundaries
authorNick Spence <Nick.Spence@freescale.com>
Sat, 30 Sep 2006 07:32:59 +0000 (00:32 -0700)
committerKim Phillips <kim.phillips@freescale.com>
Sat, 4 Nov 2006 01:42:17 +0000 (19:42 -0600)
This patch addresses a problem when CONFIG_MTD_NAND_VERIFY_WRITE is
defined
and the write crosses a block boundary. The pointer to the verification
buffer (bufstart) is not being updated to reflect the starting of the
new
block so the verification of the second block fails.

CHANGELOG:

* Fix NAND FLASH page verification across block boundaries

drivers/nand/nand_base.c

index b7a5d32fb3fb1c5320157ff861be21ba61fd68ef..6b13c4e0e3f5a0668f7a0af662c08494ddb11826 100644 (file)
@@ -1713,6 +1713,7 @@ static int nand_write_ecc (struct mtd_info *mtd, loff_t to, size_t len,
                                goto out;
                        }
                        *retlen = written;
+                       bufstart = (u_char*) &buf[written];
 
                        ofs = autoplace ? mtd->oobavail : mtd->oobsize;
                        if (eccbuf)