mtd: nand: Add a NAND_CMD_STATUS when using write verification
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/mtd/nand/nand_base.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/mtd/nand/nand_base.c +3 -0
@@ -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 ; }
Signature · 1 line
1.7.5.4
Artem Bityutskiy
AppliedQuoted 6 lines · Bastian Hecht
To make sure the NAND chip is properly programmed we need a status command before each page write. When
CONFIG_MTD_NAND_VERIFY_WRITE=ythis assumption is broken when writing multiple pages consecutively. This patch fixes this.Signed-off-by Bastian Hecht <[email protected]>
Pushed to l2-mtd.git, thanks!
Signature · 2 lines
Best Regards, Artem Bityutskiy