Home > Articles > Operating Systems, Server > Linux/UNIX/Open Source

Understanding Memory Technology Devices in Embedded Linux

  • PrintPrint
  • Share ThisShare This
  • DiscussDiscuss
Essential Linux Device Drivers

This chapter is from the book
Essential Linux Device Drivers

When you push the power switch on your handheld, it's more than likely that it boots from flash memory. When you click some buttons to save data on your cell phone, in all probability, your data starts life in flash memory. Today, Linux has penetrated the embedded space and is no longer confined to desktops and servers. Linux avatars manifest in PDAs, music players, set-top boxes, and even medical-grade devices. The Memory Technology Devices (MTD) subsystem of the kernel is responsible for interfacing your system with various flavors of flash memory found in these devices. This chapter uses the example of a Linux handheld to learn about MTD.

In This Chapter

  • What's Flash Memory?

504

  • Linux-MTD Subsystem

505

  • Map Drivers

506

  • NOR Chip Drivers

511

  • NAND Chip Drivers

513

  • User Modules

516

  • MTD-Utils

518

  • Configuring MTD

519

  • eXecute In Place

520

  • The Firmware Hub

520

  • Debugging

524

  • Looking at the Sources

524

What's Flash Memory?

Flash memory is rewritable storage that does not need power supply to hold information. Flash memory banks are usually organized into sectors. Unlike conventional storage, writes to flash addresses have to be preceded by an erase of the corresponding locations. Moreover, erases of portions of flash can be performed only at the granularity of individual sectors. Because of these constraints, flash memory is best used with device drivers and filesystems that are tailored to suit them. On Linux, such specially designed drivers and filesystems are provided by the MTD subsystem.

Flash memory chips generally come in two flavors: NOR and NAND. NOR is the variety used to store firmware images on embedded devices, whereas NAND is used for large, dense, cheap, but imperfect1 storage as required by solid-state mass storage media such as USB pen drives and Disk-On-Modules (DOMs). NOR flash chips are connected to the processor via address and data lines like normal RAM, but NAND flash chips are interfaced using I/O and control lines. So, code resident on NOR flash can be executed in place, but that stored on NAND flash has to be copied to RAM before execution.

  • Share ThisShare This
  • Your Account

Discussions

Make a New Comment

You must log in in order to post a comment.

Related Resources

Dustin SullivanIf You Are New to Mac/Objective-C Programming...
By Dustin Sullivan on June 5, 2009 No Comments

We recently sat down with several top Objective-C and Cocoa developers to talk about that state of the iPhone and OS X markets as we approach this year's WWDC.  As we were wrapping up, we threw one last question at them out of curiosity, and we thought you'd like to see what some of them said.

It's Here; Put Away Your Pre-Conceptions on What an OS Must Be: Part V
By John Traenkenschuh on May 27, 2009 No Comments

It's been a long while since you had a chance to be excited about a new version of an 'old' OS.  Now is your chance.

It's Here; Put Away Your Pre-Conceptions on What an OS Must Be: Part IV
By John Traenkenschuh on May 27, 20095 Comments

Graphical User Interfaces were important.  So was cost control.  Just what must an OS be?

See All Related Blogs

Informit Network