Why MTD ???

Hi All

I am new to Flash File system. I am going through JFFS and YAFFS material from internet.

I am not clear about Memory Technology Device layer...

.... How I can use this layer/subsystem when Implementing JFFS/YAFFS file system. what is the Necessity of this MTD.. Whether it will do any specific function??

Plz clear me.. it will be a great help for me for my futher work.

Thanks

Gururaja B O

Reply to
guru
Loading thread data ...

MTD is the driver layer needed for accessing the raw flash devices. JFFS/YAFFS et al are filesystems, i.e. they are concerned about the structuring of the data on the flash device, but they do not know how do physically read/write to/from a flash device. The situation is similar as with disk filesystems such as ext3/isofs/vfat/.. vs. disk drivers sich as ide/scsi/floppy/...

HTH

Rob

--
Robert Kaiser                     email: rkaiser AT sysgo DOT com
SYSGO AG                          http://www.elinos.com
Klein-Winternheim / Germany       http://www.sysgo.com
Reply to
Robert Kaiser

HI,

Below statement I got from

formatting link
site.

it tells about MTD that..

"The aim of the system is to make it simple to provide a driver for new hardware, by providing a generic interface between the hardware drivers and the upper layers of the system"

What is the meaning of this? and How to integrate driver with MTD.?

Thanks

Reply to
guru

The "upper layers" mentioned would be the view of, for example, a flash filesystem such as JFFS/YAFFS: To access the flash device hardware, these filesystems need some knowledge about the device such as what technology it is (e.g. NAND/NOR flash), how it is organized (e.g. number and size of blocks), etc. Also, it needs some basic methods that it can invoke to read or write from/to the flash and to erase a block. This is the "generic interface" that the MTD layer provides.

The answer, as usual, is: it depends...

The practical approach is to look at the MTD system, see what is already there and see if any of it can be adapted/extended to support your device. If the flash device you want integrated is similar to the devices that are already supported (chances are that it is), then integrating it can be as easy as configuring the right parameters. In some cases, writing a mapping driver may suffice (this is also quite simple, just look at the examples). Failing both you may need to get really involved with the code or to hire a guru..

My suggestion for you is to ask the MTD mailing list wether MTD has support for your device (give exact specifications). In my experience, the people on the list are quite friendly and willing to help.

HTH

Rob

-- Robert Kaiser email: rkaiser AT sysgo DOT com SYSGO AG

formatting link
Klein-Winternheim / Germany
formatting link

Reply to
Robert Kaiser

Hi

If i am porting YAFFS to other operating system[except LINUX] then Whether MTD is needed? Because MTD is for Linux Operating System.

Thanks

Reply to
guru

The way I see it, You have two options:

  1. Try to determine the MTD API subset that YAFFS uses and implement that from scratch on your platform, possibly ripping(*) code from MTD where appropriate.
  2. leave YAFFS as it is and port the MTD system to your OS

Which of these is the way to go is impossible to decide at the level of detail we are talking here. It would depend on how different your target OS is from Linux and how generic you need the solution to be (i.e. if you only need to deal with a single target hardware configuration with just one, well-defined flash chip setup, then all the genericism that MTD offers may not be worth the trouble involved in porting it.).

I'm afraid this is the point where you will need to get your hands dirty ...

HTH

Rob

(*) Keep in mind that you are dealing with GPLed code!

-- Robert Kaiser email: rkaiser AT sysgo DOT com SYSGO AG

formatting link
Klein-Winternheim / Germany
formatting link

Reply to
Robert Kaiser

It depends on whether you'll make calls to MTD entries from the ported code or if you're going to use some other method to call the physical device drivers.

Your system has to have some way of controlling the physical memory chips from the file system layer.

Please pay attention to the GNU Program License if you're porting to a non-GPL operating system.

--

Tauno Voipio
tauno voipio (at) iki fi
Reply to
Tauno Voipio

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.