Re: [PATCH 08/12] mtd: nand: hisi504: set ECC algorithm based on DT info

Boris Brezillon
2016-04-16T07:48:15Z

On Fri, 15 Apr 2016 21:54:08 +0200
Rafał Miłecki <zajec5@gmail.com> wrote:

> This is part of process deprecating NAND_ECC_SOFT_BCH (and switching to
> enum nand_ecc_algo).
>
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> ---
> drivers/mtd/nand/hisi504_nand.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mtd/nand/hisi504_nand.c b/drivers/mtd/nand/hisi504_nand.c
> index 7bf844c..f917297 100644
> --- a/drivers/mtd/nand/hisi504_nand.c
> +++ b/drivers/mtd/nand/hisi504_nand.c
> @@ -768,6 +768,7 @@ static int hisi_nfc_probe(struct platform_device *pdev)
> chip->chip_delay = HINFC504_CHIP_DELAY;
>
> chip->ecc.mode = of_get_nand_ecc_mode(np);
> + chip->ecc.algo = of_get_nand_ecc_algo(np);

I'm trying to remove those explicit ecc.xxx = of_get_nand_xxx()
assignments and rely on the initialization done in nand_scan_ident()
(see this series [1]).
I'd like to apply the remaining patches in [1] before this series, which
means this patch will be useless. No need to resend the series though,
I'll skip this patch while applying, just wanted to let you know.

>
> buswidth = of_get_nand_bus_width(np);
> if (buswidth == 16)

[1]http://lkml.iu.edu/hypermail/linux/kernel/1604.0/00298.html

--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering