Subject: Re: Flat device tree definitions for FLASH and MTD partitioning

From: Sergei Shtylyov <[email-masked]>
Date: Wed, 25 Apr 2007 18:34:47 +0400

Hello.

Wolfgang Grandegger wrote:

>>>>>> are there already some thought or even example code on how to 
>>>>>> define Flash memory and MTD partitions in the DTS. This would 
>>>>>> avoid the ackward MTD partitioning via static structure or boot 
>>>>>> line argument and could be done in a generic way.

>>>>>     See Documentation/powerpc/booting-without-of.txt and 
>>>>> drivers/mtd/physmap_of.c for what's been already done.

>>>>    I meant drivers/mtd/maps/physmap_of.c

>>> I had a closer look to this driver. Unfortunately, it can not handle 
>>> yet  multiple FLASH banks. This could be achieved with an additional 
>>> property "bank_count". What do you think?

   Please use hyphen, not underscore in property names ("device_type" seems an only exception from this rule).

>>  I'm not sure what banks you're talking about -- note that this driver 
>> is equivalen in functionality to the plain 'physmap' driver and 
>> there's inherited "bank-width" property that handles flash banking.
 
> Yes, I know. Nevertheless the driver cannot handle flash regions 
> composed of more than on FLASH bank because we need to probe every bank. 
> Search for "BANK" in drivers/mtd/maps" to understand what I mean.

   Hm, from what I could see, those banks are separate maps registered to MTD subsys separately.
What's the point of adding a count property when we simply can define multiple "rom" devices?

> Wolfgang.

MBR, Sergei