[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZkXvyiuB4B2Fbz4l@pengutronix.de>
Date: Thu, 16 May 2024 13:36:42 +0200
From: Sascha Hauer <s.hauer@...gutronix.de>
To: Miquel Raynal <miquel.raynal@...tlin.com>
Cc: Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/3] mtd: nand: mxc_nand: implement exec_op
On Thu, May 16, 2024 at 12:44:05PM +0200, Miquel Raynal wrote:
> Hi Sascha,
>
> s.hauer@...gutronix.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 |
Powered by blists - more mailing lists