From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Boris Brezillon <boris.brezillon@collabora.com>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <Tudor.Ambarus@microchip.com>,
Pratyush Yadav <p.yadav@ti.com>, Michael Walle <michael@walle.cc>,
<linux-mtd@lists.infradead.org>, Mark Brown <broonie@kernel.org>,
<linux-spi@vger.kernel.org>, Rob Herring <robh+dt@kernel.org>,
<devicetree@vger.kernel.org>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Xiangsheng Hou <Xiangsheng.Hou@mediatek.com>,
Julien Su <juliensu@mxic.com.tw>,
Jaime Liao <jaimeliao@mxic.com.tw>
Subject: Re: [PATCH v3 17/22] mtd: spinand: Create direct mapping descriptors for ECC operations
Date: Tue, 7 Dec 2021 11:53:32 +0100 [thread overview]
Message-ID: <20211207115332.09cab65f@xps13> (raw)
In-Reply-To: <20211207104627.7bbad94d@collabora.com>
Hi Boris,
boris.brezillon@collabora.com wrote on Tue, 7 Dec 2021 10:46:27 +0100:
> On Tue, 7 Dec 2021 10:34:17 +0100
> Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>
> > /**
> > diff --git a/include/linux/spi/spi-mem.h b/include/linux/spi/spi-mem.h
> > index 85e2ff7b840d..3be594be24c0 100644
> > --- a/include/linux/spi/spi-mem.h
> > +++ b/include/linux/spi/spi-mem.h
> > @@ -94,6 +94,7 @@ enum spi_mem_data_dir {
> > * operation does not involve transferring data
> > * @data.buf.in: input buffer (must be DMA-able)
> > * @data.buf.out: output buffer (must be DMA-able)
> > + * @ecc_en: error correction is required
> > */
> > struct spi_mem_op {
> > struct {
> > @@ -126,6 +127,8 @@ struct spi_mem_op {
> > const void *out;
> > } buf;
> > } data;
> > +
> > + bool ecc_en;
> > };
>
> I really think this should be in it's own commit.
Oh crap, I forgot about that.
> And you need to make
> sure all existing drivers reject operation that have ecc_en set to
> true (that shouldn't be too complicated since most of them use generic
> helpers to do the check).
Yes, I can add this check as well.
I will propose a first patch creating a spi-mem helper to do generic
checks, given a number of additional parameters (dtr, ecc). The current
helpers will call this generic function depending on what they check
(support for dtr or not). Then I will export this generic helper and
let the drivers use it directly if needed, in order to avoid the
explosion of helpers in the core to check all the possible combinations.
I'll certainly propose a v4 just with these patches and then apply them
within the v3 if everyone agrees with the rest.
Thanks,
Miquèl
next prev parent reply other threads:[~2021-12-07 10:53 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 9:34 [PATCH v3 00/22] External ECC engines & Macronix support Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 01/22] dt-bindings: mtd: nand-controller: Fix the reg property description Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 02/22] dt-bindings: mtd: nand-controller: Fix a comment in the examples Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 03/22] dt-bindings: mtd: nand-controller: Harmonize the property types Miquel Raynal
2021-12-14 17:45 ` Rob Herring
2021-12-15 15:50 ` Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 04/22] dt-bindings: mtd: nand-chip: Create a NAND chip description Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 05/22] dt-bindings: mtd: spi-nand: Convert spi-nand description file to yaml Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 06/22] dt-bindings: vendor-prefixes: Clarify Macronix prefix Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 07/22] dt-bindings: spi: mxic: The interrupt property is not mandatory Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 08/22] dt-bindings: spi: mxic: Convert to yaml Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 09/22] dt-bindings: spi: mxic: Document the nand-ecc-engine property Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 10/22] dt-bindings: mtd: Describe Macronix NAND ECC engine Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 11/22] mtd: spinand: macronix: Use random program load Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 12/22] mtd: nand: ecc: Add infrastructure to support hardware engines Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 13/22] mtd: nand: Add a new helper to retrieve the ECC context Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 14/22] mtd: nand: mxic-ecc: Add Macronix external ECC engine support Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 15/22] mtd: nand: mxic-ecc: Support SPI pipelined mode Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 16/22] mtd: spinand: Delay a little bit dirmap creation Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 17/22] mtd: spinand: Create direct mapping descriptors for ECC operations Miquel Raynal
2021-12-07 9:46 ` Boris Brezillon
2021-12-07 10:53 ` Miquel Raynal [this message]
2021-12-07 9:34 ` [PATCH v3 18/22] spi: mxic: Fix the transmit path Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 19/22] spi: mxic: Create a helper to configure the controller before an operation Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 20/22] spi: mxic: Create a helper to ease the start of " Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 21/22] spi: mxic: Add support for direct mapping Miquel Raynal
2021-12-07 9:34 ` [PATCH v3 22/22] spi: mxic: Add support for pipelined ECC operations 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=20211207115332.09cab65f@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=Tudor.Ambarus@microchip.com \
--cc=Xiangsheng.Hou@mediatek.com \
--cc=boris.brezillon@collabora.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jaimeliao@mxic.com.tw \
--cc=juliensu@mxic.com.tw \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=michael@walle.cc \
--cc=p.yadav@ti.com \
--cc=richard@nod.at \
--cc=robh+dt@kernel.org \
--cc=thomas.petazzoni@bootlin.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).