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.

omap-l138: ECC generation latency of emifa

Other Parts Discussed in Thread: OMAPL138

Hi,


what is the latency introduced by the ECC generation logic of emifa?
How long does it take to generate the ECC bits?

Thanks, best regards

Massimo

  • Hi Massimo,

    I've checked the data sheet and TRM of the OMAPL138 but found nothing for ECC latency.
    And I have tried to find the latency in linux OS by adding printks in between ECC calculation function.

    For 1bit ECC, I got 4.87ms latency.
    For 4bit ECC, I got 4.99ms latency.

    I've modified the following source file and line.

    linux/drivers/mtd/nand/davinci_nand.c

    For 1bit ECC,

    /*
    * Read hardware ECC value and pack into three bytes
    */
    static int nand_davinci_calculate_1bit(struct mtd_info *mtd,
    const u_char *dat, u_char *ecc_code)
    {
    unsigned int ecc_val = nand_davinci_readecc_1bit(mtd);
    unsigned int ecc24 = (ecc_val & 0x0fff) | ((ecc_val & 0x0fff0000) >> 4);

    printk("NAND 1bit ECC probe start\n");

    /* invert so that erased block ecc is correct */
    ecc24 = ~ecc24;
    ecc_code[0] = (u_char)(ecc24);
    ecc_code[1] = (u_char)(ecc24 >> 8);
    ecc_code[2] = (u_char)(ecc24 >> 16);

    printk("NAND 1bit ECC probe end\n");

    return 0;
    }

    Then I took between both probe prints and got the aforementioned values.

    Please note that I've enabled "showing timing information with printks" in kernel through "make menuconfig"