mtd: nand: Add a NAND_CMD_STATUS when using write verification
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Mon May 28 07:59:07 EDT 2012
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=09cbe581e346229e33c48da00439419ff2fe6af7
Commit: 09cbe581e346229e33c48da00439419ff2fe6af7
Parent: b6778fd7812d877abdbc78b9b2d4304150b2ce05
Author: Bastian Hecht <hechtb at googlemail.com>
AuthorDate: Fri Apr 27 12:19:31 2012 +0200
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Sun May 13 23:09:36 2012 -0500
mtd: nand: Add a NAND_CMD_STATUS when using write verification
To make sure the NAND chip is properly programmed we need a status
command before each page write. When CONFIG_MTD_NAND_VERIFY_WRITE=y this
assumption is broken when writing multiple pages consecutively. This
patch fixes this.
Signed-off-by: Bastian Hecht <hechtb at gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/nand/nand_base.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index eb88d8b..512066e 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2118,6 +2118,9 @@ static int nand_write_page(struct mtd_info *mtd, struct nand_chip *chip,
if (chip->verify_buf(mtd, buf, mtd->writesize))
return -EIO;
+
+ /* Make sure the next page prog is preceded by a status read */
+ chip->cmdfunc(mtd, NAND_CMD_STATUS, -1, -1);
#endif
return 0;
}
More information about the linux-mtd-cvs
mailing list