[PATCH] mtd: orion_nand: support selecting ECC mode via the device tree

Frank de Brabander debrabander at gmail.com
Mon Nov 16 02:16:49 PST 2015


2015-11-12 16:01 GMT+01:00 Richard Weinberger <richard.weinberger at gmail.com>:
>
> On Thu, Nov 12, 2015 at 2:55 PM, Frank de Brabander
> <debrabander at gmail.com> wrote:
> > Currently the Orion NAND ECC mode is hardcoded to NAND_ECC_SOFT, it does not
> > allow selecting any other ECC mode. This change makes it possible to use the
> > device tree to select other ECC modes. It still defaults to the original
> > mode NAND_ECC_SOFT.
> >
> > This makes the driver more in line with other mtd nand drivers, that already
> > support similar ways to select the ECC mode.
> >
> > Signed-off-by: Frank de Brabander <debrabander at gmail.com>
> > ---
> >  Documentation/devicetree/bindings/mtd/orion-nand.txt | 4 ++++
> >  drivers/mtd/nand/orion_nand.c                        | 6 +++++-
> >  2 files changed, 9 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/mtd/orion-nand.txt b/Documentation/devicetree/bindings/mtd/orion-nand.txt
> > index 2d6ab66..908c321 100644
> > --- a/Documentation/devicetree/bindings/mtd/orion-nand.txt
> > +++ b/Documentation/devicetree/bindings/mtd/orion-nand.txt
> > @@ -11,6 +11,9 @@ Optional properties:
> >  - bank-width : Width in bytes of the device. Default is 1
> >  - chip-delay : Chip dependent delay for transferring data from array to read
> >                 registers in usecs
> > +- nand-ecc-mode : String, operation mode of the NAND ecc mode, soft by default.
> > +  Supported values are: "none", "soft", "hw", "hw_syndrome", "hw_oob_first",
> > +  "soft_bch".
>
> Does the driver (and the NFC) really support all these modes?
>
> --
> Thanks,
> //richard

Good point, thanks. Only "none", "soft", and "soft_bch" are supported.
Will change the documentation and send the updated patch.

Frank



More information about the linux-mtd mailing list