]> git.sur5r.net Git - u-boot/commit
mtd: nand: omap: optimized chip->ecc.correct() for H/W ECC schemes
authorpekon gupta <pekon@ti.com>
Tue, 19 Nov 2013 05:32:17 +0000 (11:02 +0530)
committerScott Wood <scottwood@freescale.com>
Tue, 4 Mar 2014 02:09:03 +0000 (20:09 -0600)
commit6e562b1106ea6afc78752f50925e87e9dd14f8b4
tree057186dc5fb6d74e9721ba9fbd3f13dd77ec4ba1
parent71a7f95600eeea03100af66e2f11498048f32cfe
mtd: nand: omap: optimized chip->ecc.correct() for H/W ECC schemes

chip->ecc.correct() is used for detecting and correcting bit-flips during read
operations. In omap-nand driver it implemented as:
(a) omap_correct_data(): for h/w based ECC_HAM1 scheme
(b) omap_correct_data_bch() + CONFIG_NAND_OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
for ECC_BCH8 scheme using GPMC and software lib/bch.c
(c) omap_correct_data_bch() + CONFIG_NAND_OMAP_ECC_BCH8_CODE_HW
for ECC_BCH8 scheme using GPMC and ELM

This patch updates (c)
- checks for calc_ecc[]==0x00 so that error_correction is not required for
  known good pages.
- adds scalability for other ECC_BCHx scheme by merging following
  omap_rotate_ecc_bch() + omap_fix_errors_bch() => omap_correct_data_bch()
- fixing logic for bit-flip correction based on error_loc[count]

Signed-off-by: Pekon Gupta <pekon@ti.com>
drivers/mtd/nand/omap_gpmc.c