linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v11 0/2] NAND ECC engine binding changes
@ 2020-06-26  7:13 Miquel Raynal
  2020-06-26  7:13 ` [PATCH v11 1/2] dt-bindings: mtd: Document nand-ecc-engine Miquel Raynal
  2020-06-26  7:13 ` [PATCH v11 2/2] dt-bindings: mtd: Document boolean NAND ECC properties Miquel Raynal
  0 siblings, 2 replies; 6+ messages in thread
From: Miquel Raynal @ 2020-06-26  7:13 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, devicetree
  Cc: Vignesh Raghavendra, Tudor Ambarus, juliensu, Richard Weinberger,
	Boris Brezillon, linux-mtd, Thomas Petazzoni, Miquel Raynal,
	masonccyang

As part of a bigger series, I proposed these changes to facilitate the
insertion of a generic ECC engine abstraction, needed specifically for
new SPI-NAND devices not featuring any on-die engine.

The series is almost ready to be merged but the bindings did not pass
the checks. Now it is solved so I am just waiting for Rob's ack on
these two patches to apply the whole series.

Miquel Raynal (2):
  dt-bindings: mtd: Document nand-ecc-engine
  dt-bindings: mtd: Document boolean NAND ECC properties

 .../bindings/mtd/nand-controller.yaml          | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

-- 
2.20.1


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

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

* [PATCH v11 1/2] dt-bindings: mtd: Document nand-ecc-engine
  2020-06-26  7:13 [PATCH v11 0/2] NAND ECC engine binding changes Miquel Raynal
@ 2020-06-26  7:13 ` Miquel Raynal
  2020-06-29 23:00   ` Rob Herring
  2020-06-26  7:13 ` [PATCH v11 2/2] dt-bindings: mtd: Document boolean NAND ECC properties Miquel Raynal
  1 sibling, 1 reply; 6+ messages in thread
From: Miquel Raynal @ 2020-06-26  7:13 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, devicetree
  Cc: Vignesh Raghavendra, Tudor Ambarus, juliensu, Richard Weinberger,
	Boris Brezillon, linux-mtd, Thomas Petazzoni, Miquel Raynal,
	masonccyang

This property is needed to precisely point to the hardware ECC engine
to use when there are several of them available. Here, hardware also
refers to the on-die possibility.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 .../devicetree/bindings/mtd/nand-controller.yaml     | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/Documentation/devicetree/bindings/mtd/nand-controller.yaml b/Documentation/devicetree/bindings/mtd/nand-controller.yaml
index 4a0798247d2d..0969d2e6720b 100644
--- a/Documentation/devicetree/bindings/mtd/nand-controller.yaml
+++ b/Documentation/devicetree/bindings/mtd/nand-controller.yaml
@@ -56,6 +56,18 @@ patternProperties:
           (Linux will handle the calculations). soft_bch is deprecated
           and should be replaced by soft and nand-ecc-algo.
 
+      nand-ecc-engine:
+        maxItems: 1
+        description:
+	  A phandle on the hardware ECC engine if any. There are
+          basically three possibilities:
+          1/ The ECC engine is part of the NAND controller, in this
+          case the phandle should reference the parent node.
+          2/ The ECC engine is part of the NAND part (on-die), in this
+          case the phandle should reference the node itself.
+          3/ The ECC engine is external, in this case the phandle should
+          reference the specific ECC engine node.
+
       nand-ecc-placement:
         allOf:
           - $ref: /schemas/types.yaml#/definitions/string
-- 
2.20.1


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

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

* [PATCH v11 2/2] dt-bindings: mtd: Document boolean NAND ECC properties
  2020-06-26  7:13 [PATCH v11 0/2] NAND ECC engine binding changes Miquel Raynal
  2020-06-26  7:13 ` [PATCH v11 1/2] dt-bindings: mtd: Document nand-ecc-engine Miquel Raynal
@ 2020-06-26  7:13 ` Miquel Raynal
  2020-06-29 23:08   ` Rob Herring
  1 sibling, 1 reply; 6+ messages in thread
From: Miquel Raynal @ 2020-06-26  7:13 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, devicetree
  Cc: Vignesh Raghavendra, Tudor Ambarus, juliensu, Richard Weinberger,
	Boris Brezillon, linux-mtd, Thomas Petazzoni, Miquel Raynal,
	masonccyang

Document nand-use-soft-ecc-engine and nand-no-ecc-engine properties.
The former is here to force software correction, the latter prevents
any correction to happen.

These properties (along with nand-ecc-engine) are supposed to be more
accurate than the current nand-ecc-modes wich is very misleading and
very often people think it is mandatory while the core should be
relied upon to decide which correction to handle.

nand-ecc-mode was already inacurate, but it becomes totally
problematic with setups where there are several hardware engines.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 Documentation/devicetree/bindings/mtd/nand-controller.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/mtd/nand-controller.yaml b/Documentation/devicetree/bindings/mtd/nand-controller.yaml
index 0969d2e6720b..a3750978ebb8 100644
--- a/Documentation/devicetree/bindings/mtd/nand-controller.yaml
+++ b/Documentation/devicetree/bindings/mtd/nand-controller.yaml
@@ -68,6 +68,12 @@ patternProperties:
           3/ The ECC engine is external, in this case the phandle should
           reference the specific ECC engine node.
 
+      nand-use-soft-ecc-engine: true
+        description: Use a software ECC engine.
+
+      nand-no-ecc-engine: true
+        description: Do not use any ECC correction.
+
       nand-ecc-placement:
         allOf:
           - $ref: /schemas/types.yaml#/definitions/string
-- 
2.20.1


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

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

* Re: [PATCH v11 1/2] dt-bindings: mtd: Document nand-ecc-engine
  2020-06-26  7:13 ` [PATCH v11 1/2] dt-bindings: mtd: Document nand-ecc-engine Miquel Raynal
@ 2020-06-29 23:00   ` Rob Herring
  0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2020-06-29 23:00 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Mark Rutland, devicetree, Vignesh Raghavendra, Tudor Ambarus,
	juliensu, Richard Weinberger, Boris Brezillon, linux-mtd,
	Thomas Petazzoni, masonccyang

On Fri, Jun 26, 2020 at 09:13:56AM +0200, Miquel Raynal wrote:
> This property is needed to precisely point to the hardware ECC engine
> to use when there are several of them available. Here, hardware also
> refers to the on-die possibility.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  .../devicetree/bindings/mtd/nand-controller.yaml     | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mtd/nand-controller.yaml b/Documentation/devicetree/bindings/mtd/nand-controller.yaml
> index 4a0798247d2d..0969d2e6720b 100644
> --- a/Documentation/devicetree/bindings/mtd/nand-controller.yaml
> +++ b/Documentation/devicetree/bindings/mtd/nand-controller.yaml
> @@ -56,6 +56,18 @@ patternProperties:
>            (Linux will handle the calculations). soft_bch is deprecated
>            and should be replaced by soft and nand-ecc-algo.
>  
> +      nand-ecc-engine:
> +        maxItems: 1

maxItems is for arrays and this is a phandle. It needs a type reference.

> +        description:

You need '|' at the end if you want the formatting preserved.

> +	  A phandle on the hardware ECC engine if any. There are

A tab is not valid YAML. 

> +          basically three possibilities:
> +          1/ The ECC engine is part of the NAND controller, in this
> +          case the phandle should reference the parent node.
> +          2/ The ECC engine is part of the NAND part (on-die), in this
> +          case the phandle should reference the node itself.
> +          3/ The ECC engine is external, in this case the phandle should
> +          reference the specific ECC engine node.
> +
>        nand-ecc-placement:
>          allOf:
>            - $ref: /schemas/types.yaml#/definitions/string
> -- 
> 2.20.1
> 

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

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

* Re: [PATCH v11 2/2] dt-bindings: mtd: Document boolean NAND ECC properties
  2020-06-26  7:13 ` [PATCH v11 2/2] dt-bindings: mtd: Document boolean NAND ECC properties Miquel Raynal
@ 2020-06-29 23:08   ` Rob Herring
  2020-06-30  7:15     ` Miquel Raynal
  0 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2020-06-29 23:08 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Mark Rutland, devicetree, Vignesh Raghavendra, Tudor Ambarus,
	juliensu, Richard Weinberger, Boris Brezillon, linux-mtd,
	Thomas Petazzoni, masonccyang

On Fri, Jun 26, 2020 at 09:13:57AM +0200, Miquel Raynal wrote:
> Document nand-use-soft-ecc-engine and nand-no-ecc-engine properties.
> The former is here to force software correction, the latter prevents
> any correction to happen.
> 
> These properties (along with nand-ecc-engine) are supposed to be more
> accurate than the current nand-ecc-modes wich is very misleading and
> very often people think it is mandatory while the core should be
> relied upon to decide which correction to handle.
> 
> nand-ecc-mode was already inacurate, but it becomes totally
> problematic with setups where there are several hardware engines.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  Documentation/devicetree/bindings/mtd/nand-controller.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mtd/nand-controller.yaml b/Documentation/devicetree/bindings/mtd/nand-controller.yaml
> index 0969d2e6720b..a3750978ebb8 100644
> --- a/Documentation/devicetree/bindings/mtd/nand-controller.yaml
> +++ b/Documentation/devicetree/bindings/mtd/nand-controller.yaml
> @@ -68,6 +68,12 @@ patternProperties:
>            3/ The ECC engine is external, in this case the phandle should
>            reference the specific ECC engine node.
>  
> +      nand-use-soft-ecc-engine: true
> +        description: Use a software ECC engine.
> +
> +      nand-no-ecc-engine: true
> +        description: Do not use any ECC correction.
> +

Still the same problem as v10.

You want:

nand-no-ecc-engine:
  type: boolean
  description: Do not use any ECC correction.

>        nand-ecc-placement:
>          allOf:
>            - $ref: /schemas/types.yaml#/definitions/string
> -- 
> 2.20.1
> 

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

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

* Re: [PATCH v11 2/2] dt-bindings: mtd: Document boolean NAND ECC properties
  2020-06-29 23:08   ` Rob Herring
@ 2020-06-30  7:15     ` Miquel Raynal
  0 siblings, 0 replies; 6+ messages in thread
From: Miquel Raynal @ 2020-06-30  7:15 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Rutland, devicetree, Vignesh Raghavendra, Tudor Ambarus,
	juliensu, Richard Weinberger, Boris Brezillon, linux-mtd,
	Thomas Petazzoni, masonccyang

Hi Rob,

Rob Herring <robh@kernel.org> wrote on Mon, 29 Jun 2020 17:08:00 -0600:

> On Fri, Jun 26, 2020 at 09:13:57AM +0200, Miquel Raynal wrote:
> > Document nand-use-soft-ecc-engine and nand-no-ecc-engine properties.
> > The former is here to force software correction, the latter prevents
> > any correction to happen.
> > 
> > These properties (along with nand-ecc-engine) are supposed to be more
> > accurate than the current nand-ecc-modes wich is very misleading and
> > very often people think it is mandatory while the core should be
> > relied upon to decide which correction to handle.
> > 
> > nand-ecc-mode was already inacurate, but it becomes totally
> > problematic with setups where there are several hardware engines.
> > 
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > ---
> >  Documentation/devicetree/bindings/mtd/nand-controller.yaml | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/mtd/nand-controller.yaml b/Documentation/devicetree/bindings/mtd/nand-controller.yaml
> > index 0969d2e6720b..a3750978ebb8 100644
> > --- a/Documentation/devicetree/bindings/mtd/nand-controller.yaml
> > +++ b/Documentation/devicetree/bindings/mtd/nand-controller.yaml
> > @@ -68,6 +68,12 @@ patternProperties:
> >            3/ The ECC engine is external, in this case the phandle should
> >            reference the specific ECC engine node.
> >  
> > +      nand-use-soft-ecc-engine: true
> > +        description: Use a software ECC engine.
> > +
> > +      nand-no-ecc-engine: true
> > +        description: Do not use any ECC correction.
> > +  
> 
> Still the same problem as v10.

I am very sorry for the error, I fixed both commits with a fixup!
commit at the end of my series and forgot to squash them before
sending...

I'll resend the proper patches. Again, sorry for the time lost.

Thanks,
Miquèl

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

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

end of thread, other threads:[~2020-06-30  7:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-26  7:13 [PATCH v11 0/2] NAND ECC engine binding changes Miquel Raynal
2020-06-26  7:13 ` [PATCH v11 1/2] dt-bindings: mtd: Document nand-ecc-engine Miquel Raynal
2020-06-29 23:00   ` Rob Herring
2020-06-26  7:13 ` [PATCH v11 2/2] dt-bindings: mtd: Document boolean NAND ECC properties Miquel Raynal
2020-06-29 23:08   ` Rob Herring
2020-06-30  7:15     ` Miquel Raynal

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).