From: JaimeLiao <jaimeliao.tw@gmail.com>
To: linux-mtd@lists.infradead.org, miquel.raynal@bootlin.com, richard@nod.at
Cc: jaimeliao@mxic.com.tw, jaimeliao.tw@gmail.com, angyanyu13@gmail.com
Subject: [PATCH v3 2/5] mtd: spinand: Add support continuous read mode
Date: Thu, 9 Nov 2023 19:24:57 +0800 [thread overview]
Message-ID: <20231109112500.4966-3-jaimeliao@mxic.com.tw> (raw)
In-Reply-To: <20231109112500.4966-1-jaimeliao@mxic.com.tw>
The patch supports setting the "CONT" bit of the configuration
register and create spinand_continuous_read_enable/disable functions.
Signed-off-by: JaimeLiao <jaimeliao@mxic.com.tw>
---
drivers/mtd/nand/spi/core.c | 11 +++++++++++
include/linux/mtd/spinand.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index 849ccfedbc72..cfc295f5e31b 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -193,6 +193,17 @@ static int spinand_init_quad_enable(struct spinand_device *spinand)
enable ? CFG_QUAD_ENABLE : 0);
}
+static int spinand_continuous_read_enable(struct spinand_device *spinand)
+{
+ return spinand_upd_cfg(spinand, CFG_CONT_READ_ENABLE,
+ CFG_CONT_READ_ENABLE);
+}
+
+static int spinand_continuous_read_disable(struct spinand_device *spinand)
+{
+ return spinand_upd_cfg(spinand, CFG_CONT_READ_ENABLE, 0);
+}
+
static int spinand_ecc_enable(struct spinand_device *spinand,
bool enable)
{
diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h
index badb4c1ac079..bb9288ffd898 100644
--- a/include/linux/mtd/spinand.h
+++ b/include/linux/mtd/spinand.h
@@ -154,6 +154,7 @@
#define REG_CFG 0xb0
#define CFG_OTP_ENABLE BIT(6)
#define CFG_ECC_ENABLE BIT(4)
+#define CFG_CONT_READ_ENABLE BIT(2)
#define CFG_QUAD_ENABLE BIT(0)
/* status register */
--
2.17.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2023-11-09 11:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-09 11:24 [PATCH v3 0/5] mtd: spinand: Add continuous read mode support JaimeLiao
2023-11-09 11:24 ` [PATCH v3 1/5] Add clk wizard and mxic host controller driver JaimeLiao
2023-11-09 14:13 ` Miquel Raynal
2023-11-10 1:18 ` liao jaime
2023-11-09 11:24 ` JaimeLiao [this message]
2023-11-09 11:24 ` [PATCH v3 3/5] mtd: spinand: Add continuous read state JaimeLiao
2023-11-09 11:24 ` [PATCH v3 4/5] mtd: spinand: Add support continuous read operation JaimeLiao
2023-11-09 11:25 ` [PATCH v3 5/5] mtd: spinand: macronix: Add continuous read support for Macronix Flash JaimeLiao
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=20231109112500.4966-3-jaimeliao@mxic.com.tw \
--to=jaimeliao.tw@gmail.com \
--cc=angyanyu13@gmail.com \
--cc=jaimeliao@mxic.com.tw \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
/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 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.