mtd: nand: omap: Return corrected bits for BCH
Subsystems (2)
PATCH 1/1 mtd: nand: omap: Return corrected bits for BCH
If using ECC mode OMAP_ECC_HAMMING_CODE_HW_ROMCODE (which is default for all AM335x with DTS support) the page_read function won't return the corrected bitflips.
Signed-off-by Daniel Schultz <[email protected]>
--- drivers/mtd/nand/nand_omap_gpmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/mtd/nand/nand_omap_gpmc.c +4 -2
@@ -707,10 +707,12 @@ static int omap_gpmc_read_page_bch_rom_mode(struct mtd_info *mtd,__omap_calculate_ecc (mtd, buf, ecc_calc,1 ); stat =omap_correct_bch (mtd, buf, ecc_code, ecc_calc); -if (stat <0 ) +if (stat <0 ) { mtd->ecc_stats.failed++; -else + }else { mtd->ecc_stats.corrected += stat; +return stat; + }return 0 ; }
Signature · 7 lines
1.9.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox