From: Sascha Hauer <s.hauer@pengutronix.de>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/3] mtd: nand: mxc_nand: implement exec_op
Date: Thu, 16 May 2024 13:36:42 +0200 [thread overview]
Message-ID: <ZkXvyiuB4B2Fbz4l@pengutronix.de> (raw)
In-Reply-To: <20240516124405.2da1aa23@xps-13>
On Thu, May 16, 2024 at 12:44:05PM +0200, Miquel Raynal wrote:
> Hi Sascha,
>
> s.hauer@pengutronix.de wrote on Thu, 16 May 2024 12:25:43 +0200:
>
> > On Thu, May 16, 2024 at 10:32:14AM +0200, Miquel Raynal wrote:
> > > Hi Sascha,
> > >
> > > > +static const struct nand_op_parser mxcnd_op_parser = NAND_OP_PARSER(
> > > > + NAND_OP_PARSER_PATTERN(mxcnd_do_exec_op,
> > > > + NAND_OP_PARSER_PAT_CMD_ELEM(false),
> > > > + NAND_OP_PARSER_PAT_ADDR_ELEM(true, 7),
> > > > + NAND_OP_PARSER_PAT_CMD_ELEM(true),
> > > > + NAND_OP_PARSER_PAT_WAITRDY_ELEM(true),
> > > > + NAND_OP_PARSER_PAT_DATA_IN_ELEM(true, MAX_DATA_SIZE)),
> > >
> > > CMD, ADDR, CMD, DATA is the RNDOUT pattern. So it is now working fine?
> >
> > Yes, RNDOUT is working now.
>
> Excellent!
>
> > > Or did you forget to adapt the patterns to your use case?
> >
> > Although it looks like the patterns from the pl35x-nand-controller.c,
> > there is one slight difference. The 'false' in the NAND_OP_PARSER_PAT_CMD_ELEM
> > above has the effect that a plain NAND_OP_PARSER_PAT_DATA_IN_ELEM is
> > disallowed.
>
> I'm not sure I follow, the above pattern means: a single command cycle
> is supported, no?
A single command cycle indeed is and shall be supported. The
pl35x-nand-controller.c I copied this from has
NAND_OP_PARSER_PAT_CMD_ELEM(true). With all elements being optional this
also allows a single NAND_OP_PARSER_PAT_DATA_IN_ELEM()
(supported_op.data_only_read becomes true). I can't support that, so I
made the CMD mandatory.
Sascha
>
> Miquèl
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
WARNING: multiple messages have this Message-ID (diff)
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/3] mtd: nand: mxc_nand: implement exec_op
Date: Thu, 16 May 2024 13:36:42 +0200 [thread overview]
Message-ID: <ZkXvyiuB4B2Fbz4l@pengutronix.de> (raw)
In-Reply-To: <20240516124405.2da1aa23@xps-13>
On Thu, May 16, 2024 at 12:44:05PM +0200, Miquel Raynal wrote:
> Hi Sascha,
>
> s.hauer@pengutronix.de wrote on Thu, 16 May 2024 12:25:43 +0200:
>
> > On Thu, May 16, 2024 at 10:32:14AM +0200, Miquel Raynal wrote:
> > > Hi Sascha,
> > >
> > > > +static const struct nand_op_parser mxcnd_op_parser = NAND_OP_PARSER(
> > > > + NAND_OP_PARSER_PATTERN(mxcnd_do_exec_op,
> > > > + NAND_OP_PARSER_PAT_CMD_ELEM(false),
> > > > + NAND_OP_PARSER_PAT_ADDR_ELEM(true, 7),
> > > > + NAND_OP_PARSER_PAT_CMD_ELEM(true),
> > > > + NAND_OP_PARSER_PAT_WAITRDY_ELEM(true),
> > > > + NAND_OP_PARSER_PAT_DATA_IN_ELEM(true, MAX_DATA_SIZE)),
> > >
> > > CMD, ADDR, CMD, DATA is the RNDOUT pattern. So it is now working fine?
> >
> > Yes, RNDOUT is working now.
>
> Excellent!
>
> > > Or did you forget to adapt the patterns to your use case?
> >
> > Although it looks like the patterns from the pl35x-nand-controller.c,
> > there is one slight difference. The 'false' in the NAND_OP_PARSER_PAT_CMD_ELEM
> > above has the effect that a plain NAND_OP_PARSER_PAT_DATA_IN_ELEM is
> > disallowed.
>
> I'm not sure I follow, the above pattern means: a single command cycle
> is supported, no?
A single command cycle indeed is and shall be supported. The
pl35x-nand-controller.c I copied this from has
NAND_OP_PARSER_PAT_CMD_ELEM(true). With all elements being optional this
also allows a single NAND_OP_PARSER_PAT_DATA_IN_ELEM()
(supported_op.data_only_read becomes true). I can't support that, so I
made the CMD mandatory.
Sascha
>
> Miquèl
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2024-05-16 11:36 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-14 14:25 [PATCH v3 0/3] mtd: nand: mxc_nand: Convert to exec_op Sascha Hauer
2024-05-14 14:25 ` Sascha Hauer
2024-05-14 14:25 ` [PATCH v3 1/3] mtd: nand: mxc_nand: separate page read from ecc calc Sascha Hauer
2024-05-14 14:25 ` Sascha Hauer
2024-05-14 14:25 ` [PATCH v3 2/3] mtd: nand: mxc_nand: implement exec_op Sascha Hauer
2024-05-14 14:25 ` Sascha Hauer
2024-05-16 8:32 ` Miquel Raynal
2024-05-16 8:32 ` Miquel Raynal
2024-05-16 10:25 ` Sascha Hauer
2024-05-16 10:25 ` Sascha Hauer
2024-05-16 10:44 ` Miquel Raynal
2024-05-16 10:44 ` Miquel Raynal
2024-05-16 11:36 ` Sascha Hauer [this message]
2024-05-16 11:36 ` Sascha Hauer
2024-05-16 13:05 ` Miquel Raynal
2024-05-16 13:05 ` Miquel Raynal
2024-05-14 14:25 ` [PATCH v3 3/3] mtd: nand: mxc_nand: support software ECC Sascha Hauer
2024-05-14 14:25 ` Sascha Hauer
2024-05-15 8:29 ` Sascha Hauer
2024-05-15 8:29 ` Sascha Hauer
2024-05-16 8:33 ` Miquel Raynal
2024-05-16 8:33 ` Miquel Raynal
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=ZkXvyiuB4B2Fbz4l@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--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 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.