Using BCH rom code mode we start calculating with GPMC_BCH_RESULTx_1. Fix offset for correct error correction. Fixes: d4077860c902 ("mtd: nand: omap: unbreak BCH8 support") Signed-off-by: Teresa Remmet <t.remmet@xxxxxxxxx> --- drivers/mtd/nand/nand_omap_gpmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c index 277e23e57f7d..2dcf7e723b9f 100644 --- a/drivers/mtd/nand/nand_omap_gpmc.c +++ b/drivers/mtd/nand/nand_omap_gpmc.c @@ -676,7 +676,7 @@ static int omap_gpmc_read_page_bch_rom_mode(struct mtd_info *mtd, p = buf; for (i = 0, j = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize, j++) { - __omap_calculate_ecc(mtd, &ecc_calc[i - j], j); + __omap_calculate_ecc(mtd, &ecc_calc[i - j], j + 1); stat = omap_correct_bch(mtd, p, &ecc_code[i], &ecc_calc[i - j]); if (stat < 0) { mtd->ecc_stats.failed++; -- 2.7.4 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox