]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mtd: nand: omap_gpmc: fix broken error correction
authorLothar Waßmann <LW@KARO-electronics.de>
Fri, 6 May 2016 12:49:23 +0000 (14:49 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 6 May 2016 12:49:23 +0000 (14:49 +0200)
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

index 5af213c75849d0615c022d1bceae7f8f2d2abcb4..746fb4adbd3a4c605ef9c3af5c482ef204bab406 100644 (file)
@@ -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;
 #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;
        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;
        nand->ecc.strength = 8;
        nand->ecc.hwctl = omap_enable_ecc_bch;
        nand->ecc.correct = omap_correct_data_bch;