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.

DM816x NAND ECC mode selection

From the following information, TI recommends that we use 8-bit BCH when writing U-BOOT to nand.

http://processors.wiki.ti.com/index.php/DM816x_AM389x_PSP_U-Boot#Flashing_U-Boot_from_U-Boot

http://processors.wiki.ti.com/index.php/DM816x_AM389x_PSP_Flashing_Tools_Guide#Burning_images_to_NAND_Flash_.28using_CCS.29

We would like to boot a kernel that was written to NAND using the Linux mtd-utils program "nandwrite".   When we do this we are getting ECC errors when reading the kernel from u-boot.

Questions:

1) How do we configure Linux to use a desired ECC mode?

2) Do U-BOOT and the DM816x support booting U-boot and a kernel using other ECC modes than HW 8-bit BCH?

Thanks,

--B

  • Bandeg,

    The Uboot should be flashed to NAND using 8bit BCH because the ROM code reads it using that scheme. The kernel can be flashed in 1 bit HW as well as 8 bit BCH scheme (depending on what scheme the Uboot is reading the flashed kernel). By default the Uboot reads in 1bit HW ECC scheme. So by default, the kernel should be flashed with 1 bit HW ECC scheme.

    1)The ECC mode that Linux would support (read/write) can be altered by changing the ECC scheme mentioned in the following 2 places in the code:

    - kernel/arch/arm/mach-omap2/board-flash.c

    (board_nand_init function - "board_nand_data.ecc_opt = OMAP_ECC_HAMMING_CODE_HW;")

    -kernel/drivers/mtd/nand/omap2.c

    (probe function - "pdata->ecc_opt = OMAP_ECC_HAMMING_CODE_HW;")

    2)The Uboot HAS to be flashed in 8bit BCH mode (as the ROM code reads only using that scheme). The Uboot and linux can support 1bit HW ECC by default.

    Regards,

    Parth