This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Large page nand with BCH16 in u-boot

Other Parts Discussed in Thread: AM3352

Hello

 I have a custom board with a am3352 and a Micron 2 GB NAND with a 4096kb page size. Currently I'm running the latest main line u-boot with the TI posted BCH16 patches applied.

The problem I'm experiencing is a bit of a weird one. I can write a large image to NAND and read it back to RAM just fine without any errors but if I initialize an area as an UBI image i.e

ubi part <partition name>

reboot and try attach it again with the same command I get a lot of Unrecoverable ECC error messages.

The same thing goes if I write my rootfs as an ubi image to nand with ubi write $loadaddr 0 0x<len> i can read it back to RAM with nand read but if I try to attach it as an ubi image I get ECC errors again.  

If I purposefully sabotage the image on NAND and then try to read it back with nand read then it also will give ECC errors so that seems to be working.

Suspecting that something is hardcoded in UBI or some such thing but have any one seen or have any insights in this kind of a problem?

Oh, and one last thing. I'm booting the system off SPI flash and not directly from NAND.

BR

//Henrik

  • Hi,

    Have you tried flashing the UBI image from U-Boot? Can you try following these instructions: http://processors.wiki.ti.com/index.php/UBIFS_Support

    Best regards,
    Miroslav

  • Thanks,

     I think I've found where the issue lies. I need to initialize the NAND with an offset of 4096, which is the page size, otherwise it tries to use sub pages which does not work.

    So with:

    ubi part flash 4096

    I can get it to initialize the free space and re attach it without any errors. 

    So now to get it working under linux also. I'll  post some new questions if I get into trouble with it.

    //Henrik

  • I too have been encountering many issues using BCH16 and UBI.  I am using a 2GB MLC Nand from Micron.  I have BCH16 working great in U-Boot and i simply write a ubi image pre-formatted so i don't use any UBI functions within U-Boot. However, i have yet to get it to fully work in the Kernel.  So i would be interested to hear how you make out!

    Basically, i initially found that the UBI drivers in the kernel were too strict to work for the MLC NAND.  They expect to read back all F's after an erase, but i found that i was seeing persistent bit-flips with the MLC NAND.  I had to modify the drivers to accept correctable bitflips even immediately after an erase.  That fixed my failed Torture Test issues, but now i am having a different issue.  Basically on first boot everything is great, the UBI rootfs attaches and all is well.  However, on the second boot i receive many ecc errors ONLY on reading the ec headers.  I am still able to attach to the rootfs fine and everything looks good, so i am not sure what is going on exactly. I am thinking i am having an issue with the BCH16 stuff, which i pulled from the OMAP3 tree (http://arago-project.org/git/projects/?p=linux-omap3.git;a=summary).

    Unfortunately it will be awhile until i have time to dig in further.  For now i have just written the rootfs using BCH8 to just avoid the issue altogether.  But seeing as how im using less reliable MLC NAND i am really going to want to get BCH16 working at some point i think : ).

    Good Luck to you!!!!