mtd: flash drivers set ecc strength
[deliverable/linux.git] / drivers / mtd / nand / mxc_nand.c
index 3c4c0533191d5e59c7546f81f2465719e8b4ee99..cc0678a967c12c6b054d21ee3fe5b868ee997924 100644 (file)
@@ -1225,6 +1225,13 @@ static int __init mxcnd_probe(struct platform_device *pdev)
                goto escan;
        }
 
+       if (this->ecc.mode == NAND_ECC_HW) {
+               if (nfc_is_v1())
+                       this->ecc.strength = 1;
+               else
+                       this->ecc.strength = (host->eccsize == 4) ? 4 : 8;
+       }
+
        /* Register the partitions */
        mtd_device_parse_register(mtd, part_probes, NULL, pdata->parts,
                                  pdata->nr_parts);
This page took 0.023911 seconds and 5 git commands to generate.