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.

Linux/TMS320DM8168: nand ecc

Part Number: TMS320DM8168


Tool/software: Linux

  I and using DM8168 with nand boot.

  dvrdk_04 uboot support hw 2(BCH8),but In the function “ti81xx_correct_data”, it says "corrects one bit error if it has occured" :

 So dm8168's dvrdk_04 uboot just Support  one bit error if it has occured ?

/*
* ti81xx_correct_data - Compares the ecc read from nand spare area with ECC
* registers values and corrects one bit error if it has occured
* Further details can be had from TI81xx TRM and the following selected links:
* en.wikipedia.org/.../Hamming_code
* www.cs.utexas.edu/.../ErrorCorrection-4.pdf
*
* @mtd: MTD device structure
* @dat: page data
* @read_ecc: ecc read from nand flash
* @calc_ecc: ecc read from ECC registers
*
* @return 0 if data is OK or corrected, else returns -1

  • Hi Echo,

    ti81xx_correct_data() is used for 1-bit HW ECC Hamming Code:

    u-boot# nandecc hw 0

    For 8-bit HW BCH ECC (BCH8), ti81xx_correct_data_bch() is used:

    u-boot# nandecc hw 2

    See u-boot/drivers/mtd/nand/ti81xx_nand.c, __ti81xx_nand_switch_ecc() for more details.

    Regards,
    Pavel