mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	linux-mtd@lists.infradead.org,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Richard Weinberger <richard@nod.at>
Cc: linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
	Aleksei Mamlin <mamlinav@gmail.com>,
	valdis.kletnieks@vt.edu
Subject: [PATCH v3 01/16] mtd: nand: Fix nand_command_lp() for 8bits opcodes
Date: Mon, 20 Jun 2016 11:26:47 +0200	[thread overview]
Message-ID: <1466414822-18948-2-git-send-email-boris.brezillon@free-electrons.com> (raw)
In-Reply-To: <1466414822-18948-1-git-send-email-boris.brezillon@free-electrons.com>

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 0b0dc29d2af7..c2f832360871 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

  reply	other threads:[~2016-06-20  9:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-20  9:26 [PATCH v3 00/16] mtd: nand: allow vendor specific detection/initialization Boris Brezillon
2016-06-20  9:26 ` Boris Brezillon [this message]
2016-06-20  9:26 ` [PATCH v3 02/16] mtd: nand: get rid of the mtd parameter in all auto-detection functions Boris Brezillon
2016-06-20  9:26 ` [PATCH v3 03/16] mtd: nand: store nand ID in struct nand_chip Boris Brezillon
2016-06-20  9:26 ` [PATCH v3 04/16] mtd: nand: get rid of busw parameter Boris Brezillon
2016-06-20  9:26 ` [PATCH v3 05/16] mtd: nand: rename nand_get_flash_type() into nand_detect() Boris Brezillon
2016-06-20  9:26 ` [PATCH v3 06/16] mtd: nand: add manufacturer specific initialization/detection steps Boris Brezillon
2016-06-20  9:26 ` [PATCH v3 07/16] mtd: nand: kill the MTD_NAND_IDS Kconfig option Boris Brezillon
2016-06-20  9:26 ` [PATCH v3 08/16] mtd: nand: move Samsung specific init/detection logic in nand_samsung.c Boris Brezillon
2016-06-20  9:26 ` [PATCH v3 09/16] mtd: nand: move Hynix specific init/detection logic in nand_hynix.c Boris Brezillon
2016-06-20  9:26 ` [PATCH v3 10/16] mtd: nand: move Toshiba specific init/detection logic in nand_toshiba.c Boris Brezillon
2016-06-20  9:26 ` [PATCH v3 11/16] mtd: nand: move Micron specific init logic in nand_micron.c Boris Brezillon
2016-06-20  9:26 ` [PATCH v3 12/16] mtd: nand: move AMD/Spansion specific init/detection logic in nand_amd.c Boris Brezillon
2016-06-20  9:26 ` [PATCH v3 13/16] mtd: nand: move Macronix specific initialization in nand_macronix.c Boris Brezillon
2016-06-20  9:27 ` [PATCH v3 14/16] mtd: nand: samsung: retrieve ECC requirements from extended ID Boris Brezillon
2016-06-20  9:27 ` [PATCH v3 15/16] mtd: nand: hynix: rework NAND ID decoding to extract more information Boris Brezillon
2016-06-20  9:27 ` [PATCH v3 16/16] mtd: nand: hynix: add read-retry support for 1x nm MLC NANDs Boris Brezillon
2016-06-20  9:31 ` [PATCH v3 00/16] mtd: nand: allow vendor specific detection/initialization Boris Brezillon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1466414822-18948-2-git-send-email-boris.brezillon@free-electrons.com \
    --to=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mamlinav@gmail.com \
    --cc=richard@nod.at \
    --cc=valdis.kletnieks@vt.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®