mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 10:14:23 +08:00
mtd: nand: fsmc: validate ECC setup by checking algorithm directly
NAND core sets ECC algorithm in algo field now and it should be preferred over the mode field. This also prepares driver for dropping NAND_ECC_SOFT_BCH. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
This commit is contained in:
parent
e9d4faed71
commit
ef296dc947
@ -958,9 +958,12 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
|
||||
nand->ecc.strength = 1;
|
||||
break;
|
||||
|
||||
case NAND_ECC_SOFT:
|
||||
case NAND_ECC_SOFT_BCH:
|
||||
dev_info(&pdev->dev, "Using 4-bit SW BCH ECC scheme\n");
|
||||
break;
|
||||
if (nand->ecc.algo == NAND_ECC_BCH) {
|
||||
dev_info(&pdev->dev, "Using 4-bit SW BCH ECC scheme\n");
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
dev_err(&pdev->dev, "Unsupported ECC mode!\n");
|
||||
|
Loading…
Reference in New Issue
Block a user