Hi,
I have some trouble with the BCH4 on the SDK 4.01. Looking at NAND driver (drivers/mtd/nand/omap2.c), I face some points I cannot explain:
in omap_correct_data()
- why is omap_calculate_ecc() called ? The ECC generated by the GMPC is fetch in the MTD layer and passed as arguments. Calling it again gives others values.
 - Why not just a memcmp for BCH4/BCH8 as for the others ECC style.
 - why is BCH8 not part of the switch in the version from SDK 5.02 ?
 
Other point is in the BCH code itself:
- why is the output of berlekamp limited to 4 or 8, respective BCH 4 and BCH 8. Should not be the real numbers of error returned to decode_bch as code seems to expect ?
 
If anyone could give some pointers .... that would be great :-)
Cheers
David