All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] mtd: nand: do not check R/B# for CMD_READID in nand_command(_lp)
@ 2017-09-15 12:44 Masahiro Yamada
  2017-09-15 12:44 ` [U-Boot] [PATCH 2/2] mtd: nand: do not check R/B# for CMD_SET_FEATURES " Masahiro Yamada
  2017-10-15 13:30 ` [U-Boot] [PATCH 1/2] mtd: nand: do not check R/B# for CMD_READID " Masahiro Yamada
  0 siblings, 2 replies; 4+ messages in thread
From: Masahiro Yamada @ 2017-09-15 12:44 UTC (permalink / raw)
  To: u-boot

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(+)

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:
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/2] mtd: nand: do not check R/B# for CMD_SET_FEATURES in nand_command(_lp)
  2017-09-15 12:44 [U-Boot] [PATCH 1/2] mtd: nand: do not check R/B# for CMD_READID in nand_command(_lp) Masahiro Yamada
@ 2017-09-15 12:44 ` Masahiro Yamada
  2017-10-15 13:31   ` Masahiro Yamada
  2017-10-15 13:30 ` [U-Boot] [PATCH 1/2] mtd: nand: do not check R/B# for CMD_READID " Masahiro Yamada
  1 sibling, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2017-09-15 12:44 UTC (permalink / raw)
  To: u-boot

Set Features (0xEF) command toggles the R/B# pin after 4 sub feature
parameters are written.

Currently, nand_command(_lp) calls chip->dev_ready immediately after
the address cycle because NAND_CMD_SET_FEATURES falls into default:
label.  No wait is needed at this point.

If you see nand_onfi_set_features(), R/B# is already cared by the
chip->waitfunc call.

[masahiro: import Linux commit c5d664aa5a4c4b257a54eb35045031630d105f49]

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(+)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 776c20f..a95134c 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -652,6 +652,7 @@ static void nand_command(struct mtd_info *mtd, unsigned int command,
 	case NAND_CMD_SEQIN:
 	case NAND_CMD_STATUS:
 	case NAND_CMD_READID:
+	case NAND_CMD_SET_FEATURES:
 		return;
 
 	case NAND_CMD_RESET:
@@ -750,6 +751,7 @@ static void nand_command_lp(struct mtd_info *mtd, unsigned int command,
 	case NAND_CMD_RNDIN:
 	case NAND_CMD_STATUS:
 	case NAND_CMD_READID:
+	case NAND_CMD_SET_FEATURES:
 		return;
 
 	case NAND_CMD_RESET:
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 1/2] mtd: nand: do not check R/B# for CMD_READID in nand_command(_lp)
  2017-09-15 12:44 [U-Boot] [PATCH 1/2] mtd: nand: do not check R/B# for CMD_READID in nand_command(_lp) Masahiro Yamada
  2017-09-15 12:44 ` [U-Boot] [PATCH 2/2] mtd: nand: do not check R/B# for CMD_SET_FEATURES " Masahiro Yamada
@ 2017-10-15 13:30 ` Masahiro Yamada
  1 sibling, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2017-10-15 13:30 UTC (permalink / raw)
  To: u-boot

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.

-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/2] mtd: nand: do not check R/B# for CMD_SET_FEATURES in nand_command(_lp)
  2017-09-15 12:44 ` [U-Boot] [PATCH 2/2] mtd: nand: do not check R/B# for CMD_SET_FEATURES " Masahiro Yamada
@ 2017-10-15 13:31   ` Masahiro Yamada
  0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2017-10-15 13:31 UTC (permalink / raw)
  To: u-boot

2017-09-15 21:44 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> Set Features (0xEF) command toggles the R/B# pin after 4 sub feature
> parameters are written.
>
> Currently, nand_command(_lp) calls chip->dev_ready immediately after
> the address cycle because NAND_CMD_SET_FEATURES falls into default:
> label.  No wait is needed at this point.
>
> If you see nand_onfi_set_features(), R/B# is already cared by the
> chip->waitfunc call.
>
> [masahiro: import Linux commit c5d664aa5a4c4b257a54eb35045031630d105f49]
>
> 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.

-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-15 13:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-15 12:44 [U-Boot] [PATCH 1/2] mtd: nand: do not check R/B# for CMD_READID in nand_command(_lp) Masahiro Yamada
2017-09-15 12:44 ` [U-Boot] [PATCH 2/2] mtd: nand: do not check R/B# for CMD_SET_FEATURES " Masahiro Yamada
2017-10-15 13:31   ` Masahiro Yamada
2017-10-15 13:30 ` [U-Boot] [PATCH 1/2] mtd: nand: do not check R/B# for CMD_READID " Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.