]> git.baikalelectronics.ru Git - uboot.git/commit
mtd: rawnand: fsl_elbc: Fix detection when nand_scan_ident() has not selected ecc...
authorPali Rohár <pali@kernel.org>
Mon, 20 Jun 2022 11:07:03 +0000 (13:07 +0200)
committerPeng Fan <peng.fan@nxp.com>
Sun, 3 Jul 2022 07:13:51 +0000 (15:13 +0800)
commit60975ceaa1ffb26ead31b770aa7a9f604b88c695
tree02ca0904aea1fc4c3d393410e48f7c9d5a296433
parent67e8ca322ce987e7622fa5364eb91d7e43501c36
mtd: rawnand: fsl_elbc: Fix detection when nand_scan_ident() has not selected ecc.mode

ecc.mode is set to 0 (aliased to NAND_ECC_NONE) either when function
nand_scan_ident() has not selected ecc.mode or when it selected it to none
ecc mode.

Distinguish between these two states by checking of node property
"nand-ecc-mode" which function nand_scan_ident() uses for filling ecc.mode.

This change fixes usage of none ecc mode if it is specified in DTS file.

Fixes: 0fe929c4f70b ("mtd: rawnand: fsl_elbc: Use ECC configuration from device tree")
Signed-off-by: Pali Rohár <pali@kernel.org>
drivers/mtd/nand/raw/fsl_elbc_nand.c