Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

Flash configuration in the Kernel

From Texas Instruments Wiki
Jump to: navigation, search

Introduction

What is the MTD Subsystem

The Memory Technology Devices (MTD) subsystem allows for support for a wide variety of Flash devices. It abstracts the details of the device interaction and provides an interface for communication with Flash devices. The details of how to actually communicate with the Flash device are left to individual device drivers which conform to the MTD API. This enables users to program their Flash chips without worrying about the specifics of how to communicate with the Flash device.

Flash Types supported

In the TI DaVinci kernel there are MTD compatible drivers that allow the user to interact with NOR Flash (both AMD and Intel) as well as NAND flash. Not all EVMs have both types of Flash. For example the DM644x has both NOR and NAND Flash, whereas the DM355 has only NAND Flash. For details about the Flash devices on your EVM please refer to the Technical Reference documentation for your EVM.

Enabling NOR Support

This section covers enabling NOR Flash support in the MontaVista TI DaVinci kernel. For open source git kernel see NOR configuration.

For devices such as the DM644x EVM the NOR Flash may be an AMD or Intel chip depending on the hardware revision of your EVM.

You can use the flinfo command from the u-boot prompt to determine your Flash type. For AMD chips you should see output similar to the following:

   dvevm# flinfo
  Bank # 1: MY AMD 29LV256M (256 Mbit)

AMD NOR Chip

To enable support in the kernel for AMD NOR chips you must enable:

  1. MTD support
  2. DaVinci NOR Flash (AMD Flash)
  3. AMD compatible flash chip support (non-CFI)

For example to enable MTD support you should have the following selected in "Memory Technology Devices (MTD)" when running xconfig

MTD enabled.jpg


To enable AMD Flash support you should have the following selected in the "RAM/ROM/Flash chip drivers" section of the "Memory Technology Devices (MTD)" section


AMD NOR enabled.jpg

Intel NOR Chip

To enable support in the kernel for Intel NOR chips you must enable:

  1. MTD support
  2. DaVinci NOR Flash (Intel Flash)
  3. Support for Intel/Sharp flash chips

For example to enable MTD support you should have the following selected in "Memory Technology Devices (MTD)" when running xconfig

MTD enabled.jpg


To enable Intel Flash support you should have the following selected in the "RAM/ROM/Flash chip drivers" section of the "Memory Technology Devices (MTD)" section


Intel NOR enabled.jpg

Enabling NAND Support

For open source git kernel see NAND configuration. To enable support in the MontaVista TI kernel for NAND Flash you must enable:

  1. MTD support
  2. NAND Device Support
  3. NAND Flash device on DaVinci SoC

For example to enable MTD support you should have the following selected in "Memory Technology Devices (MTD)" when running xconfig

MTD enabled.jpg


To enable NAND Flash support you should have the following selected in the "NAND Flash Device Drivers" section of the "Memory Technology Devices (MTD)" section


NAND enabled.jpg

Conclusion

You should now have a kernel with Flash support enabled. You can now compile this kernel and use it to access your Flash devices. For more information on compiling the kernel please refer to the Building a New Linux Kernel section of the Getting Started Guide for you product.