diff mbox series

[U-Boot,1/2] mtd: nand: do not check R/B# for CMD_READID in nand_command(_lp)

Message ID 1505479499-2862-1-git-send-email-yamada.masahiro@socionext.com
State Accepted
Commit 6f29c7a8f1fa8abef167d9017947cf090e39d60e
Delegated to: Scott Wood
Headers show
Series [U-Boot,1/2] mtd: nand: do not check R/B# for CMD_READID in nand_command(_lp) | expand

Commit Message

Masahiro Yamada Sept. 15, 2017, 12:44 p.m. UTC
Read ID (0x90) command does not toggle the R/B# pin.  Without this
patch, NAND_CMD_READID falls into the default: label, then R/B# is
checked by chip->dev_ready().

[masahiro: import Linux commit 3158fa0e739615769cc047d2428f30f4c3b6640e]

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---

 drivers/mtd/nand/nand_base.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Masahiro Yamada Oct. 15, 2017, 1:30 p.m. UTC | #1
2017-09-15 21:44 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> Read ID (0x90) command does not toggle the R/B# pin.  Without this
> patch, NAND_CMD_READID falls into the default: label, then R/B# is
> checked by chip->dev_ready().
>
> [masahiro: import Linux commit 3158fa0e739615769cc047d2428f30f4c3b6640e]
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---

Scott is silent, but this patch was accepted in Linux.

Applied to u-boot-uniphier.
diff mbox series

Patch

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 3f1b3a7..776c20f 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -651,6 +651,7 @@  static void nand_command(struct mtd_info *mtd, unsigned int command,
 	case NAND_CMD_ERASE2:
 	case NAND_CMD_SEQIN:
 	case NAND_CMD_STATUS:
+	case NAND_CMD_READID:
 		return;
 
 	case NAND_CMD_RESET:
@@ -748,6 +749,7 @@  static void nand_command_lp(struct mtd_info *mtd, unsigned int command,
 	case NAND_CMD_SEQIN:
 	case NAND_CMD_RNDIN:
 	case NAND_CMD_STATUS:
+	case NAND_CMD_READID:
 		return;
 
 	case NAND_CMD_RESET: