mtd: nand: nand_omap_gpmc: Fix ecc steps
The eccsteps where set wrong for OMAP_ECC_BCH8_CODE_HW_ROMCODE.
So the ECC was only corrected for the first 512 bytes chunk of a 2k page.

Moved out the ecc step iteration out of the correcting loop to make
it more alike the generic nand functions. And made sure that
the ECC is caclulated for all chunks.

This patch is based on work of Sascha Hauer.

Fixes commit dec7b4d2bf9c ("mtd: nand_omap_gpmc: fix BCH error correction").

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent a74c7fa commit ee3d0a0dbb63eb9e41de29b12fcef7615d0b7c8d
@Teresa Remmet Teresa Remmet authored on 23 May 2018
Sascha Hauer committed on 24 May 2018
Showing 1 changed file
View
drivers/mtd/nand/nand_omap_gpmc.c