[PATCH 33/39] mtd: nand: denali: support 1024 byte ECC step size
Rob Herring
robh at kernel.org
Thu Dec 1 07:58:26 PST 2016
On Sun, Nov 27, 2016 at 03:06:19AM +0900, Masahiro Yamada wrote:
> This driver was originally written for the Intel MRST platform with
> several platform specific parameters hard-coded. Another thing we
> need to fix is the hard-coded ECC step size. Currently, it is
> defined as follows:
>
> #define ECC_SECTOR_SIZE 512
>
> (somehow, it is defined in both denali.c and denali.h)
>
> This must be avoided because the Denali IP supports 1024 byte ECC
> size as well. Add a new flag DENALI_CAPS_ECC_SIZE_1024. If it is
> specified, ecc.size is set to 1024, otherwise set to 512.
>
> We can use "nand-ecc-step-size" DT property to override the ecc.size
> if we want, but this capability flag can provide the reasonable
> default because it is associated with the DT compatible strings.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
> ---
>
> .../devicetree/bindings/mtd/denali-nand.txt | 4 ++++
Acked-by: Rob Herring <robh at kernel.org>
> drivers/mtd/nand/denali.c | 26 +++++++++++-----------
> drivers/mtd/nand/denali.h | 3 +--
> 3 files changed, 18 insertions(+), 15 deletions(-)
More information about the linux-mtd
mailing list