some FAQs - DiskOnChip, CompactFlash, IDE stuff.

David Woodhouse dwmw2 at infradead.org
Sat Apr 21 09:25:09 EDT 2001


I received a couple of questions - in private email so I won't quote it
here, but I do want my answers to go to the list so hopefully I don't get
asked again in the near future...

The questions were basically "is it possible to write a CompactFlash MTD 
driver" and "Why does the MTD driver for the DiskOnChip exist, since it 
supports INT 13h BIOS calls and works like a true IDE drive?"

The MTD drivers are for driving memory devices, including flash. Most of 
the code is for driving standard NOR flash chips attached (fairly) directly 
to the CPU's memory bus. 

CompactFlash devices are not flash, as far as the computer is concerned -
they _really_ are IDE drives, and electrically you cannot tell otherwise.

You may think they have flash chips inside them - we couldn't possibly
comment. They may as well be alien technology which allowed the manufacturer
to shrink a normal disk drive so it fits inside that package and stop you
from hearing the whirring sounds.

CompactFlash devices are driven by the existing IDE drivers in Linux. They 
can operate in 'True IDE' mode, or they can operate as PCMCIA IDE devices - 
mostly the latter is used. (CompactFlash is also used as a term for a 
slightly smaller form factor of PCMCIA socket. It has nothing to do with 
actual flash in that case either :)

CompactFlash devices do all the wear levelling internally. Like FTL and 
NFTL, they have a kind of pseudo-filesystem which they use for emulating a 
block device with normal-sized (512 byte) sectors. But they do it entirely 
internally, and you cannot see inside.

The DiskOnChip devices are _not_ IDE devices. They are real NAND flash 
devices, connected to the CPU's memory bus via a clever ASIC - and the 
computer actually has to deal with the flash chips directly - the emulation 
of a hard drive is done in software, not in hardware as in the case of 
CompactFlash. Hence they're driven by a special device driver which is part 
of the MTD system.

The DiskOnChip devices come with their own special BIOS extension to drive
the hardware (and the translation layer on the flash) and pretend to be a
block device via the standard INT 13h DOS interface. But once Linux is
running, that BIOS extension is useless. They have nothing to do with IDE.
_Any_ block device has to provide an INT 13h interface to DOS, including
SCSI drives and ramdisks. 

--
dwmw2




To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org



More information about the linux-mtd mailing list