U-boot bch4_sw vs omap bch4_hw

jean-philippe francois jp.francois at cynove.com
Mon Dec 10 04:41:10 EST 2012

2012/12/8 Ivan Djelic <ivan.djelic at parrot.com>:
> On Fri, Dec 07, 2012 at 03:26:06PM +0000, jean-philippe francois wrote:
>> Hi Ivan,
>> I have applied your patches for hardware bch ecc support on
>> OMAP. On the linux side, everything is fine. However I have some trouble
>> when it comes to u-boot and kernel interoperability.
>> A nand page written with bch4_sw ecc by U-boot fails the ecc step when
>> read by the kernel. Looking at a nanddump, OOB placement and size of
>> the ecc data are the same.
>> Do you know of any patch for u-boot that would make the  bch4_sw ecc
>> identical to the kernel one ?
> Hi Jean-Philippe,
> If you point me to a git repo with the exact u-boot version you are using,
> I can probably provide a patch (or at least understand the problem).
> BR,
> --
> Ivan
I am using an u-boot from the arago project :

So it is quite old.
I will probably have to modify x-loader, too.
Both implementation use very similar file for hardware assisted
bch decoding.

If this code is too old for you to look at, could you help me find an omap
project that "new ecc" all the way up from x-loader to u-boot + kernel ?

If I understands things correctly, I have two options if I want to use
Nand that needs
4-bit ecc :
- Stick with the old ecc scheme in x-loader and u-boot, and use
software 4-bit bch in the kernel.
  Is this compatible with using ubifs ?
- Implement new ecc scheme in x-loader and u-boot, and use hardware
assisted bch-4 in the kernel.
Is this correct ?

Thank you for your interest,

Jean-Philippe François.

More information about the linux-mtd mailing list