Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1426414
| From | Boris Brezillon <boris.brezillon@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 01/16] mtd: nand: Fix nand_command_lp() for 8bits opcodes |
| Date | 2016-06-20 11:40 +0200 |
| Message-ID | <rM3Qu-6sw-37@gated-at.bofh.it> (permalink) |
| References | <rM3Qt-6sw-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 00/16] mtd: nand: allow vendor specific detection/initialization Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-20 11:40 +0200 [PATCH v3 12/16] mtd: nand: move AMD/Spansion specific init/detection logic in nand_amd.c Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-20 11:40 +0200 [PATCH v3 07/16] mtd: nand: kill the MTD_NAND_IDS Kconfig option Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-20 11:40 +0200 [PATCH v3 04/16] mtd: nand: get rid of busw parameter Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-20 11:40 +0200 [PATCH v3 09/16] mtd: nand: move Hynix specific init/detection logic in nand_hynix.c Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-20 11:40 +0200 [PATCH v3 11/16] mtd: nand: move Micron specific init logic in nand_micron.c Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-20 11:40 +0200 [PATCH v3 03/16] mtd: nand: store nand ID in struct nand_chip Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-20 11:40 +0200 [PATCH v3 01/16] mtd: nand: Fix nand_command_lp() for 8bits opcodes Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-20 11:40 +0200 [PATCH v3 15/16] mtd: nand: hynix: rework NAND ID decoding to extract more information Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-20 11:40 +0200 [PATCH v3 02/16] mtd: nand: get rid of the mtd parameter in all auto-detection functions Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-20 11:40 +0200 [PATCH v3 13/16] mtd: nand: move Macronix specific initialization in nand_macronix.c Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-20 11:40 +0200 [PATCH v3 16/16] mtd: nand: hynix: add read-retry support for 1x nm MLC NANDs Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-20 11:40 +0200 [PATCH v3 08/16] mtd: nand: move Samsung specific init/detection logic in nand_samsung.c Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-20 11:40 +0200 Re: [PATCH v3 00/16] mtd: nand: allow vendor specific detection/initialization Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-20 11:40 +0200 [PATCH v3 14/16] mtd: nand: samsung: retrieve ECC requirements from extended ID Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-20 11:40 +0200 [PATCH v3 10/16] mtd: nand: move Toshiba specific init/detection logic in nand_toshiba.c Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-20 11:40 +0200 [PATCH v3 05/16] mtd: nand: rename nand_get_flash_type() into nand_detect() Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-20 11:50 +0200 [PATCH v3 06/16] mtd: nand: add manufacturer specific initialization/detection steps Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-20 11:50 +0200
csiph-web