mtd: nand: Add a STATUS CMD after write verification
Subsystems (2)
RFC 1/1 mtd: nand: Add a STATUS CMD after write verification
When using CONFIG_MTD_NAND_VERIFY_WRITE=y an extra read command is sent to the NAND chip after writing a page. We need an extra status command to avoid hick-ups that lead to page write failures.
---
Hello all,
I'm experiencing problems with my current setup and CONFIG_MTD_NAND_VERIFY_WRITE=y. Usually the command sequence is like0x70 Status read0x80 0x10 Page prog0x700x80 0x10 Page prog0x70
...
When activating write verification there is a read command before the page prog.0x80 0x100x700x0 read0x80 0x100x70
...
This makes my chip write garbage, while the patch fixes it. Now I wonder if this problem is caused by my NAND chip only, or if this is a general problem that should be adressed.
--- drivers/mtd/nand/nand_base.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/mtd/nand/nand_base.c +2 -0
@@ -2101,6 +2101,8 @@ static int nand_write_page(struct mtd_info *mtd, struct nand_chip *chip,if (chip->verify_buf (mtd, buf, mtd->writesize))return -EIO ; + + chip->cmdfunc (mtd,NAND_CMD_STATUS ,-1 ,-1 );#endif return 0 ; }
Signature · 1 line
1.7.5.4
2012/4/18 Bastian Hecht <[email protected]>:
Quoted 16 lines
When using
CONFIG_MTD_NAND_VERIFY_WRITE=yan extra read command is sent to the NAND chip after writing a page. We need an extra status command to avoid hick-ups that lead to page write failures.
---Hello all,
I'm experiencing problems with my current setup and
CONFIG_MTD_NAND_VERIFY_WRITE=y. Usually the command sequence is like0x70Status read0x800x10Page prog0x700x800x10Page prog0x70
...
Quoted 2 lines
When activating write verification there is a read command before the page prog.
I've written this unclearly. I mean if we issue multiple page writes, the page writes are not preceeded by a status read, but by a page read command from the last verification.
Quoted 29 lines
0x800x100x700x0read0x800x100x70
...
This makes my chip write garbage, while the patch fixes it. Now I wonder if this problem is caused by my NAND chip only, or if this is a general problem that should be adressed.
---
drivers/mtd/nand/nand_base.c | 2 ++1 files changed, 2 insertions(+), 0 deletions(-)drivers/mtd/nand/nand_base.c +2
-1@@ -2101,6 +2101,8 @@ static int nand_write_page(struct mtd_info *mtd, struct nand_chip *chip, if (chip->verify_buf(mtd, buf, mtd->writesize)) return -EIO; + + chip->cmdfunc(mtd, NAND_CMD_STATUS, -1, -1); #endif return 0; } --1.7.5.4
Quoted 17 lines · Bastian Hecht
2012/4/18 Bastian Hecht <[email protected]>:
Quoted 16 lines
When using
CONFIG_MTD_NAND_VERIFY_WRITE=yan extra read command is sent to the NAND chip after writing a page. We need an extra status command to avoid hick-ups that lead to page write failures.
---Hello all,
I'm experiencing problems with my current setup and
CONFIG_MTD_NAND_VERIFY_WRITE=y. Usually the command sequence is like0x70Status read0x800x10Page prog0x700x800x10Page prog0x70
...
Quoted 6 lines
Quoted 2 lines
When activating write verification there is a read command before the page prog.
I've written this unclearly. I mean if we issue multiple page writes, the page writes are not preceeded by a status read, but by a page read command from the last verification.
Looks good to me. Could you send the final patch with final commit message. Probably a small comment in the code is also a good idea.
Signature · 2 lines
Best Regards, Artem Bityutskiy
Quoted 2 lines
Looks good to me. Could you send the final patch with final commit message. Probably a small comment in the code is also a good idea.
Thanks for taking a look at it. I'll post it in a sec.
Quoted 3 lines
--
Best Regards,
Artem Bityutskiy