* [PATCH] mtd: nand: Add a NAND_CMD_STATUS when using write verification
@ 2012-04-27 10:19 Bastian Hecht
2012-04-29 17:49 ` Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: Bastian Hecht @ 2012-04-27 10:19 UTC (permalink / raw)
To: linux-mtd; +Cc: Artem Bityutskiy
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@gmail.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 8a393f9..58335cd 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2101,6 +2101,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;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd: nand: Add a NAND_CMD_STATUS when using write verification
2012-04-27 10:19 [PATCH] mtd: nand: Add a NAND_CMD_STATUS when using write verification Bastian Hecht
@ 2012-04-29 17:49 ` Artem Bityutskiy
0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2012-04-29 17:49 UTC (permalink / raw)
To: Bastian Hecht; +Cc: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 424 bytes --]
On Fri, 2012-04-27 at 12:19 +0200, Bastian Hecht wrote:
> 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@gmail.com>
Pushed to l2-mtd.git, thanks!
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-29 17:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-27 10:19 [PATCH] mtd: nand: Add a NAND_CMD_STATUS when using write verification Bastian Hecht
2012-04-29 17:49 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).