mtd: nand: davinci: set ECC algorithm explicitly
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> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
This commit is contained in:
Родитель
04dae62c89
Коммит
867f9873fe
|
@ -723,8 +723,17 @@ static int nand_davinci_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
switch (info->chip.ecc.mode) {
|
switch (info->chip.ecc.mode) {
|
||||||
case NAND_ECC_NONE:
|
case NAND_ECC_NONE:
|
||||||
|
pdata->ecc_bits = 0;
|
||||||
|
break;
|
||||||
case NAND_ECC_SOFT:
|
case NAND_ECC_SOFT:
|
||||||
pdata->ecc_bits = 0;
|
pdata->ecc_bits = 0;
|
||||||
|
/*
|
||||||
|
* This driver expects Hamming based ECC when ecc_mode is set
|
||||||
|
* to NAND_ECC_SOFT. Force ecc.algo to NAND_ECC_HAMMING to
|
||||||
|
* avoid adding an extra ->ecc_algo field to
|
||||||
|
* davinci_nand_pdata.
|
||||||
|
*/
|
||||||
|
info->chip.ecc.algo = NAND_ECC_HAMMING;
|
||||||
break;
|
break;
|
||||||
case NAND_ECC_HW:
|
case NAND_ECC_HW:
|
||||||
if (pdata->ecc_bits == 4) {
|
if (pdata->ecc_bits == 4) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче