From: Boris Brezillon <boris.brezillon@collabora.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <tudor.ambarus@microchip.com>,
Richard Weinberger <richard@nod.at>,
Boris Brezillon <bbrezillon@kernel.org>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Ludovic Desroches <ludovic.desroches@microchip.com>,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH 1/2] mtd: rawnand: Propage CS selection to sub operations
Date: Mon, 27 Apr 2020 20:22:15 +0200 [thread overview]
Message-ID: <20200427202215.1469230b@collabora.com> (raw)
In-Reply-To: <20200427170002.37d78066@xps13>
On Mon, 27 Apr 2020 17:00:02 +0200
Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> Hi Boris,
>
> Boris Brezillon <boris.brezillon@collabora.com> wrote on Sat, 18 Apr
> 2020 21:49:58 +0200:
>
> > 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,
>
> I think this information might become important, could you as well add
> it to the parser tracer? Something like this would do the trick:
>
Sure, I'll do that. Thanks for the diff.
> --- a/drivers/mtd/nand/raw/nand_base.c
> +++ b/drivers/mtd/nand/raw/nand_base.c
> @@ -2112,7 +2112,7 @@ static void nand_op_parser_trace(const struct nand_op_parser_ctx *ctx)
> char *prefix = " ";
> unsigned int i;
>
> - pr_debug("executing subop:\n");
> + pr_debug("executing subop (CS%d):\n", ctx->subop.cs);
>
> for (i = 0; i < ctx->ninstrs; i++) {
> instr = &ctx->instrs[i];
>
> > .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;
>
> With this small addition:
>
> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
>
> Thanks,
> Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
prev parent reply other threads:[~2020-04-27 18:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=20200427202215.1469230b@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=alexandre.belloni@bootlin.com \
--cc=bbrezillon@kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=ludovic.desroches@microchip.com \
--cc=miquel.raynal@bootlin.com \
--cc=nicolas.ferre@microchip.com \
--cc=richard@nod.at \
--cc=tudor.ambarus@microchip.com \
--cc=vigneshr@ti.com \
/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;
as well as URLs for NNTP newsgroup(s).