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.

NAND ECC Issues (summary)

Other Parts Discussed in Thread: AM1705

I've noticed a reoccurring theme across several of the TI platform forums. It seems that a lot of users have battled various issues with ECC and memory devices. My goal for this post is to start a discussion with the E2E community about some of the problems they have faced with ECC on their platform (and hopefully there solution.) I think it would aid the E2E community as a whole if we had a catch-all for those trying to debug/develop solutions to their ECC issues on their target. 

I'd like to propose a simple format for listing your experiences. I haven't put a lot of thought into a format that will totally encapsulate everyone's application so if anyone has a better idea, please post. My only firm suggestion is one issue per post. Also, please define as a minimum, your

TARGET:

MEMORY INTERFACE:

MEMORY DEVICE:

ISSUE:

DESCRIPTION:

with "SOLUTION: " Being optional. 

Thanks,

Andrew

 

 

  • TARGET: AM1705

    MEMORY INTERFACE: EMIFA 8-Bit

    MEMORY DEVICE: NAND Micron 4Gb x 8-bit (MT29F4G08ABADAWP)

    ISSUE: BBT Descriptors in u-Boot don't match Linux definitions.

    DESCRIPTION: Discrepancies between the BBT main and mirror descriptors don't match between u-Boot and Linux. This causes BBT corruption and various other memory related issues.

    SOLUTION:

    My fix for that was in board-da830-evm.c: Basically, to comment(/* ARF */) out the original offsets and add those that matched the values in u-Boot.

    static struct nand_bbt_descr da830_evm_nand_bbt_main_descr = { 

        .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | 

            NAND_BBT_WRITE | NAND_BBT_2BIT | 

            NAND_BBT_VERSION | NAND_BBT_PERCHIP, 

        /* ARF these should match u-boot .offs = 2, 

           .len = 4, 

           .veroffs = 16, 

           .maxblocks = 4,*/ 

        .offs    = 8, 

        .len = 4, 

        .veroffs = 12, 

        .maxblocks = 4, 

        .pattern = da830_evm_nand_bbt_pattern };

    static struct nand_bbt_descr da830_evm_nand_bbt_mirror_descr = { 

        .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | 

            NAND_BBT_WRITE | NAND_BBT_2BIT | 

            NAND_BBT_VERSION | NAND_BBT_PERCHIP, 

        /* ARF these should match u-boot .offs = 2, 

           .len = 4, 

           .veroffs = 16, 

           .maxblocks = 4, 

           .pattern = da830_evm_nand_mirror_pattern */ 

        .offs    = 8, 

        .len = 4, 

        .veroffs = 12, 

        .maxblocks = 4, 

        .pattern = da830_evm_nand_mirror_pattern };

  • TARGET: AM1705

    MEMORY INTERFACE: EMIFA 8-Bit

    MEMORY DEVICE: NAND Micron 4Gb x 8-bit (MT29F4G08ABADAWP)

    ISSUE: HW ECC and writable file system support

    DESCRIPTION:

    I can't seem to come up with the magic formula for using a JFFS2 file system on my platform. I get various outputs from the mtd device like

    mtd->read (some size bytes from some address) returned ECC error:

    and also,

    JFFS2 error: (937) jffs2_do_read_inode_internal: CRC failed for read_inode of inode 334 at physical location 0x40b4480

    Depending on where this happens it can cause kernel crashes.

    I'm also getting,

    JFFS2 warning: (912)

    JFFS2 notice: (940)

    and,

    Unabled to handle kernel NULL pointer dereference at virtual address 00000001.

    All of these messages seem to hover around CRC failures. 

     

    SOLUTION: ?

    Can anyone definitively answer whether or not HWECC is supported on the Sitara/Davinci platform?

    Has anyone figured out the magic configuration for getting u-Boot and the Linux Kernel ECC to play nicely?

    I'd like to be able to support filesystem/kernel updates from u-Boot and have support of either UBIFS, JFFS2 or YAFFS under Linux. So far I've failed on all atempts.

     

    Thanks,

    Andrew

     

  • If anyone comes across similar issues with trying to write jffs2 filesystems or ubifs from u-Boot, I've had success working with the latest 2011.06 u-Boot repository patched with

    Ben Gardiner's changes to support write.trimffs.

    His check-in dates are from 2011-07-01.

    Andrew