]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mtd: nand: lpc32xx_mlc: fix ecc.size
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Mon, 7 Dec 2015 22:26:03 +0000 (23:26 +0100)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 26 Jan 2016 18:27:37 +0000 (10:27 -0800)
According to the ECC layout description the actual ecc.size is 512 bytes
and not mtd->writesize.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/lpc32xx_mlc.c

index 9bc435d72a861b2a75d650f943a7522dd7e317ac..d8c3e7afcc0bfa74c5d0a87e580ca53a6b28e916 100644 (file)
@@ -750,7 +750,7 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
        }
 
        nand_chip->ecc.mode = NAND_ECC_HW;
-       nand_chip->ecc.size = mtd->writesize;
+       nand_chip->ecc.size = 512;
        nand_chip->ecc.layout = &lpc32xx_nand_oob;
        host->mlcsubpages = mtd->writesize / 512;