Browse Source

mtd: nand: davinci: set ECC algorithm explicitly for HW based ECC

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
master
Alexander Couzens 5 years ago
committed by Harald Welte
parent
commit
27afed7454
  1. 3
      drivers/mtd/nand/davinci_nand.c

3
drivers/mtd/nand/davinci_nand.c

@ -760,11 +760,14 @@ static int nand_davinci_probe(struct platform_device *pdev)
info->chip.ecc.hwctl = nand_davinci_hwctl_4bit;
info->chip.ecc.bytes = 10;
info->chip.ecc.options = NAND_ECC_GENERIC_ERASED_CHECK;
info->chip.ecc.algo = NAND_ECC_BCH;
} else {
/* 1bit ecc hamming */
info->chip.ecc.calculate = nand_davinci_calculate_1bit;
info->chip.ecc.correct = nand_davinci_correct_1bit;
info->chip.ecc.hwctl = nand_davinci_hwctl_1bit;
info->chip.ecc.bytes = 3;
info->chip.ecc.algo = NAND_ECC_HAMMING;
}
info->chip.ecc.size = 512;
info->chip.ecc.strength = pdata->ecc_bits;

Loading…
Cancel
Save