OF compatible MTD platform RAM driver ?

Laurent Pinchart laurentp at cse-semaphore.com
Tue Mar 25 12:44:42 EDT 2008


On Tuesday 25 March 2008 17:23, Sergei Shtylyov wrote:
> Laurent Pinchart wrote:
> 
> >>>We're talking about a very specific type of RAM, used for permanent 
storage 
> >>>with a battery backup. The RAM is really meant to be used as an MTD 
device 
> >>>and as such I think it makes sense to describe it as an mtd-compatible 
device 
> >>>on the local bus.
> 
> >>>What about the following definition for the RAM node ?
> 
> >>>        nvram at 2,0000 {
> 
> >>    Note that there's a OF "device_type" of "nvram", so your (generic) 
device 
> >>name seems to add some mess. (IIRC, that OF device type didn't actually 
> >>represent a "real" device, and only served to provide access to NVRAM for 
OF).
> 
> > Ok.
> 
>     Well, I might have gone too far here -- it should be a real device 
> (spec'ed in Device Support Extensions recommended practice). It's just that 
> the spec didn't mention "reg" property, only "#bytes" (the device capacity). 
> So, it may be worth considering...

The nvram device descrived in the Device Support Extensions is probably meant 
to describe the kind of nvram found in RTC chips. That memory isn't directly 
accessible. As the spec doesn't mention this explicitely we could still reuse 
the nvram device type for direct-mapped battery-backed ram. I have no strong 
opinion for or against that.

> >>>                compatible = "mtd,ram";
> 
> >>    The part before comma should be a company name or a stock ticker. What 
did 
> >>you mean here?
> 
> > I didn't know that. Let's say I meant "mtd-ram" :-)
> 
> >>>                reg = <2 0x0000 0x00100000>;
> >>>                bank-width = <2>;
> >>>        };
> 
> >>>Or should the node have a device-type property of either 'ram' or 'rom' 
with 
> >>>the compatible property just referencing MTD ?
> 
> >>    The "device_type" properties are not required and their further 
creation 
> >>has been discouraged on liunxppc-dev.
> 
> > What about
> 
> > 	mtdram at 2,0000 {
> > 		compatible = "mtd-ram";
> > 		reg = <2 0x0000 0x00100000>;
> > 		bank-width = <2>;
> > 	};
> 
> > ROMs could use "mtd-rom" for their compatible property.
> 
>     Heh, there was a whole company against mentioning "mtd" when we started 
> working on this (of course, the first idea was to call the flash device type 
> "mtd"). I don't think "mtd" looks good here -- I'd suggest "flash-ram" (if 
> this is just a linearly mapped NVRAM).

I'm fine with "flash-ram" (even thought it looks a bit weird). I'll prepare a 
patch.

Best regards,

-- 
Laurent Pinchart
CSE Semaphore Belgium

Chaussée de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-mtd/attachments/20080325/d9232d94/attachment.bin 


More information about the linux-mtd mailing list