mtd: nand: Fix nand_command_lp() for 8bits opcodes
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Sat Oct 8 21:59:06 PDT 2016
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=fde85cfd2d079bdd733d7b07d9a5775a6f70f458
Commit: fde85cfd2d079bdd733d7b07d9a5775a6f70f458
Parent: 4796d8655915b8dce265318542a40d920aad91a3
Author: Boris Brezillon <boris.brezillon at free-electrons.com>
AuthorDate: Wed Jun 15 13:09:51 2016 +0200
Committer: Boris Brezillon <boris.brezillon at free-electrons.com>
CommitDate: Fri Sep 23 09:35:16 2016 +0200
mtd: nand: Fix nand_command_lp() for 8bits opcodes
8 bits opcodes should be followed by a single address cycle. Make the
2nd address cycle dependent of !nand_opcode_8bits(command).
Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
---
drivers/mtd/nand/nand_base.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index a74d9e4..c061469 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -745,7 +745,10 @@ static void nand_command_lp(struct mtd_info *mtd, unsigned int command,
column >>= 1;
chip->cmd_ctrl(mtd, column, ctrl);
ctrl &= ~NAND_CTRL_CHANGE;
- chip->cmd_ctrl(mtd, column >> 8, ctrl);
+
+ /* Only ouput a single addr cycle for 8bits opcodes. */
+ if (!nand_opcode_8bits(command))
+ chip->cmd_ctrl(mtd, column >> 8, ctrl);
}
if (page_addr != -1) {
chip->cmd_ctrl(mtd, page_addr, ctrl);
More information about the linux-mtd-cvs
mailing list