NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Disabling NAND HW ECC support

From Texas Instruments Wiki
Jump to: navigation, search

Introduction[edit]

This page will walk the user through disabling HW ECC support for DaVinci NAND devices in the TI LSP kernel. This is needed in order to use the YAFFS file system since the YAFFS file system does not use HW ECC.

Disabling HW ECC support[edit]

This section is broken down into 2 subsections. The first section is for the LSP 1.10 kernel shipped with version 1.20 of the DVSDK. The second section is for LSP 1.20 and greater shipped with version 1.30 and greater of the DVSDK. In this example it is assumed that the user has a copy of the LSP kernel in /home/user/workdir/ti-davinci.

LSP 1.10[edit]

In order to disable HW ECC support in LSP 1.10 you must:

  1. Remove the kernel configuration option for HW ECC
  2. Patch the nand_davinci.c file located at drivers/mtd/nand/ from the root of the kernel tree to not make calls to the HW ECC functions when the HW ECC is disabled.
  • Configure the kernel using xconfig
   host$ cd /home/user/workdir/ti-davinci
   host$ make ARCH=arm CROSS_COMPILE=arm_v5t_le- xconfig
  • Disable HW ECC support

The option for HW ECC support is located under Memory Technology Devices (MTD) -> NAND Flash Device Drivers. Uncheck the Hardware ECC Support on NAND Device for DaVinci option. For example you should see a screen like the following:

HW ECC disable.jpg

  • Save the configuration and exit xconfig
  • Patch the nand_davinci.c file
  1. Download the patch file to a temporary directory. For this example I will use /tmp
  2. Unzip the patch file
    1. host$ cd /tmp
    2. gunzip disable_hw_ecc_for_yaffs.patch.gz
  3. Test and apply the patch to the kernel source
    1. host$ cd /home/user/workdir/ti-davinci
    2. host$ patch -p1 --dry-run < /tmp/disable_hw_ecc_for_yaffs.patch
    3. If the above dry-run succeeds patch the kernel for real
    4. host$ patch -p1 < /tmp/disable_hw_ecc_for_yaffs.patch

LSP 1.20 and greater[edit]

In order to disable HW ECC in LSP 1.20 and greater you need to modify the nand_data structure in the board configuration file for your EVM.

The board configuration file is located in the arch/arm/mach-davinci directory of the kernel tree. The configuration file for the DM644x family is board-evm.c whereas for the DM355 and later devices it is board-<device>-evm.c (i.e. board-dm355-evm.c)

In the board configuration file you need to modify the nand_data structure and change the ".eccmode" member to NAND_ECC_SOFT. For example on the DM6446 the .eccmode member should be changed from

   .eccmode = NAND_ECC_HW3_512

To

   .eccmode = NAND_ECC_SOFT

Conclusion[edit]

Once you have made the above modifications the kernel is now set to use software ECC for the NAND device rather than HW ECC. You may now use this kernel with the YAFFS file system.

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Disabling NAND HW ECC support here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Disabling NAND HW ECC support here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Disabling NAND HW ECC support here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Disabling NAND HW ECC support here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Disabling NAND HW ECC support here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Disabling NAND HW ECC support here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Disabling NAND HW ECC support here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Disabling NAND HW ECC support here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Disabling NAND HW ECC support here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity