From b3d3706275cc5f57fa655cc54f88ddb5b229a012 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lothar=20Wa=C3=9Fmann?= Date: Fri, 6 May 2016 14:49:23 +0200 Subject: [PATCH] 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. --- drivers/mtd/nand/omap_gpmc.c | 5 ----- 1 file changed, 5 deletions(-) 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; -- 2.39.2