Skip to content

Commit

Permalink
mtd: nand: Add a NAND_CMD_STATUS when using write verification
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Bastian Hecht authored and David Woodhouse committed May 14, 2012
1 parent b6778fd commit 09cbe58
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 09cbe58

Please sign in to comment.