From: Lothar Waßmann Date: Fri, 6 May 2016 12:49:23 +0000 (+0200) Subject: mtd: nand: omap_gpmc: fix broken error correction X-Git-Tag: KARO-TX48-2016-05-06~3 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=commitdiff_plain;h=b3d3706275cc5f57fa655cc54f88ddb5b229a012 mtd: nand: omap_gpmc: fix broken error correction The patch to enable GPMC prefetch erroneously set the ECC size to the full page size. This had the side effect that only the first 512 byte of each page were checked for errors and corrected. --- diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c index 5af213c758..746fb4adbd 100644 --- a/drivers/mtd/nand/omap_gpmc.c +++ b/drivers/mtd/nand/omap_gpmc.c @@ -1128,13 +1128,8 @@ int board_nand_init(struct nand_chip *nand) #if defined(CONFIG_AM33XX) || defined(CONFIG_NAND_OMAP_BCH8) nand->ecc.mode = NAND_ECC_HW; nand->ecc.layout = &hw_bch8_nand_oob; -#ifdef CONFIG_SYS_GPMC_PREFETCH_ENABLE - nand->ecc.size = CONFIG_SYS_NAND_ECCSIZE * 4; - nand->ecc.bytes = CONFIG_SYS_NAND_ECCBYTES * 4; -#else nand->ecc.size = CONFIG_SYS_NAND_ECCSIZE; nand->ecc.bytes = CONFIG_SYS_NAND_ECCBYTES; -#endif nand->ecc.strength = 8; nand->ecc.hwctl = omap_enable_ecc_bch; nand->ecc.correct = omap_correct_data_bch;