All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: Fix nand_command_lp() for 8bits opcodes
@ 2016-06-15 11:09 Boris Brezillon
  2016-09-16 13:16 ` Boris Brezillon
  0 siblings, 1 reply; 2+ messages in thread
From: Boris Brezillon @ 2016-06-15 11:09 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, linux-mtd, Boris Brezillon,
	Richard Weinberger
  Cc: linux-kernel

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@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 0b0dc29..c2f83236 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);
-- 
2.7.4

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

* Re: [PATCH] mtd: nand: Fix nand_command_lp() for 8bits opcodes
  2016-06-15 11:09 [PATCH] mtd: nand: Fix nand_command_lp() for 8bits opcodes Boris Brezillon
@ 2016-09-16 13:16 ` Boris Brezillon
  0 siblings, 0 replies; 2+ messages in thread
From: Boris Brezillon @ 2016-09-16 13:16 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, linux-mtd, Boris Brezillon,
	Richard Weinberger
  Cc: linux-kernel

On Wed, 15 Jun 2016 13:09:51 +0200
Boris Brezillon <boris.brezillon@free-electrons.com> wrote:

> 8 bits opcodes should be followed by a single address cycle. Make the
> 2nd address cycle dependent of !nand_opcode_8bits(command).

Applied.

> 
> Signed-off-by: Boris Brezillon <boris.brezillon@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 0b0dc29..c2f83236 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);

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

end of thread, other threads:[~2016-09-16 13:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-15 11:09 [PATCH] mtd: nand: Fix nand_command_lp() for 8bits opcodes Boris Brezillon
2016-09-16 13:16 ` Boris Brezillon

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.