linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mtd: rawnand: Propage CS selection to sub operations
@ 2020-04-18 19:49 Boris Brezillon
  2020-04-18 19:49 ` [PATCH 2/2] mtd: rawnand: atmel: Convert the driver to exec_op() Boris Brezillon
  2020-04-27 15:00 ` [PATCH 1/2] mtd: rawnand: Propage CS selection to sub operations Miquel Raynal
  0 siblings, 2 replies; 8+ messages in thread
From: Boris Brezillon @ 2020-04-18 19:49 UTC (permalink / raw)
  To: Miquel Raynal, linux-mtd
  Cc: Alexandre Belloni, Vignesh Raghavendra, Tudor Ambarus,
	Richard Weinberger, Boris Brezillon, Nicolas Ferre,
	Ludovic Desroches, Boris Brezillon

Some controller using the instruction parse infrastructure might need
to know which CS a specific sub-operation is targeting. Let's propagate
this information.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
---
 drivers/mtd/nand/raw/nand_base.c | 1 +
 include/linux/mtd/rawnand.h      | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index c24e5e2ba130..fa9ac18e97a1 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -2176,6 +2176,7 @@ int nand_op_parser_exec_op(struct nand_chip *chip,
 			   const struct nand_operation *op, bool check_only)
 {
 	struct nand_op_parser_ctx ctx = {
+		.subop.cs = op->cs,
 		.subop.instrs = op->instrs,
 		.instrs = op->instrs,
 		.ninstrs = op->ninstrs,
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
index 1e76196f9829..8e8d1a61e2fb 100644
--- a/include/linux/mtd/rawnand.h
+++ b/include/linux/mtd/rawnand.h
@@ -694,6 +694,7 @@ struct nand_op_instr {
 
 /**
  * struct nand_subop - a sub operation
+ * @cs: the CS line to select for this NAND sub-operation
  * @instrs: array of instructions
  * @ninstrs: length of the @instrs array
  * @first_instr_start_off: offset to start from for the first instruction
@@ -709,6 +710,7 @@ struct nand_op_instr {
  * controller driver.
  */
 struct nand_subop {
+	unsigned int cs;
 	const struct nand_op_instr *instrs;
 	unsigned int ninstrs;
 	unsigned int first_instr_start_off;
-- 
2.25.2


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

end of thread, other threads:[~2020-04-27 18:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-18 19:49 [PATCH 1/2] mtd: rawnand: Propage CS selection to sub operations Boris Brezillon
2020-04-18 19:49 ` [PATCH 2/2] mtd: rawnand: atmel: Convert the driver to exec_op() Boris Brezillon
2020-04-27 15:17   ` Miquel Raynal
2020-04-27 18:25     ` Boris Brezillon
2020-04-27 18:27     ` Boris Brezillon
2020-04-27 18:36       ` Miquel Raynal
2020-04-27 15:00 ` [PATCH 1/2] mtd: rawnand: Propage CS selection to sub operations Miquel Raynal
2020-04-27 18:22   ` Boris Brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).