[RFC] Adding MTD to device tree

Josh Boyer jwboyer at jdub.homelinux.org
Sat Aug 12 11:53:21 EST 2006


On Fri, 2006-08-11 at 23:10 +0200, Arnd Bergmann wrote:
> On Friday 11 August 2006 17:31, Sergei Shtylyov wrote:
> > +   h) MTD nodes
> > +
> > +   Memory Technology Devices are flash, ROM, and similar chips, often used
> > +   for solid state file systems on embedded devices.
> > +
> > +   Required properties:
> > +
> > +    - device_type : has to be "mtd"
> > +    - compatible : Should be the name of the MTD driver. Currently, this is
> > +      most likely to be "physmap".
> > +    - reg : Offset and length of the register set for the device.
> 
> I would prefer to call them something different in the device tree.
> The name 'mtd' is very specific to Linux, but the device tree
> is a more generic concept.

Agreed here.

> 
> I understand that the booting-without-of.txt file is by definition
> Linux specific as well, but we should be prepared for making parts
> of it a OS independent binding at the point where we put the same
> device nodes into actual OF implementations that able to boot
> different operating systems.
> 
> I would prefer a naming that has 
> 
>    Required properties:
>     - device_type : one of "nand-flash", "nor-flash", or "rom".

There are more than just those kinds of MTDs.  There's dataflash,
AG-AND, NVRAM, ioremappable DRAM, etc.  I'd prefer it to just be called
"flash".  See more below.

>     - model : an identifier for the actual controller chip used.

Meaning what exactly?  Lots of NOR flash doesn't have a "controller".

>     - compatible : Should be the name of the MTD driver. For
>       type "rom", this is most likely "physmap".

This I agree with, but Sergei already had this.  And since you're
specifying the name of the MTD driver, that typically already knows what
type of chip it's talking to.

For example, physmap will probe for CFI, JEDEC, and ROM devices already.
It can't do NAND flash, so you'd have to specify the name of a NAND
driver, such as ndfc.c and that only deals with NAND flash.

josh




More information about the Linuxppc-dev mailing list