[RFC] Adding MTD to device tree

Sergei Shtylyov sshtylyov at ru.mvista.com
Sat Aug 12 01:31:11 EST 2006


Hello.

    Here's the proposal for the representation of the MTD (optionally having
some partitions) in the device tree, along with the sample code that parses 
the MTD node and hands the necessary information to the 'physmap' driver using 
the 'platform_device' method.  The representation was fitted to the current 
Linux MTD driver model, so it doesn't bear any information on the chip models 
or the flash interflace, letting the MTD probing code figure all that out 
(this part might need some changes I suspect).

    To me, however, this method seems too limiting: we have to look thru the
device tree for each particular kind MTDs (assuming that there could be
different ones that 'physmap' can't drive) and register each of them its own
way.  If we teach 'physmap' to register on the 'of_platform_device' bus, we
may look up the device tree for *any* MTD nodes somewhere in arch/powerpc/ 
tree, register them all, and leave it up to the particular driver to claim 
them and get the information the driver needs from their node's properties. 
That would require introducing another MTD partition pasrsing module (so the 
code that parses the partitions in this patch will move into the separate 
module under drivers/mtd/).

    Opinions on what way should be taken and what needs to be added from both
PowerPC and MTD communities are very welcome.

WBR, Sergei

Signed-off-by: Sergei Shtylyov <sshtylyov at ru.mvista.com>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: OF-physmap-device.patch
Url: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060811/ebf70715/attachment.txt 


More information about the Linuxppc-embedded mailing list