* Flat device tree definitions for FLASH and MTD partitioning
@ 2007-04-08 11:37 Wolfgang Grandegger
2007-04-08 12:11 ` Sergei Shtylyov
0 siblings, 1 reply; 12+ messages in thread
From: Wolfgang Grandegger @ 2007-04-08 11:37 UTC (permalink / raw)
To: linuxppc-embedded
Hello,
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.
Thanks.
Wolfgang.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Flat device tree definitions for FLASH and MTD partitioning
2007-04-08 11:37 Flat device tree definitions for FLASH and MTD partitioning Wolfgang Grandegger
@ 2007-04-08 12:11 ` Sergei Shtylyov
2007-04-08 12:21 ` Sergei Shtylyov
0 siblings, 1 reply; 12+ messages in thread
From: Sergei Shtylyov @ 2007-04-08 12:11 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: linuxppc-embedded
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.
> Thanks.
>
> Wolfgang.
WBR, Sergei
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Flat device tree definitions for FLASH and MTD partitioning
2007-04-08 12:11 ` Sergei Shtylyov
@ 2007-04-08 12:21 ` Sergei Shtylyov
2007-04-08 12:41 ` Wolfgang Grandegger
2007-04-25 12:55 ` Wolfgang Grandegger
0 siblings, 2 replies; 12+ messages in thread
From: Sergei Shtylyov @ 2007-04-08 12:21 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: linuxppc-embedded
Hello, I 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
>>Thanks.
>>Wolfgang.
WBR, Sergei
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Flat device tree definitions for FLASH and MTD partitioning
2007-04-08 12:21 ` Sergei Shtylyov
@ 2007-04-08 12:41 ` Wolfgang Grandegger
2007-04-25 12:55 ` Wolfgang Grandegger
1 sibling, 0 replies; 12+ messages in thread
From: Wolfgang Grandegger @ 2007-04-08 12:41 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: linuxppc-embedded
Sergei Shtylyov wrote:
> Hello, I 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
Ah, I missed that, thanks a lot.
Wolfgang.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Flat device tree definitions for FLASH and MTD partitioning
2007-04-08 12:21 ` Sergei Shtylyov
2007-04-08 12:41 ` Wolfgang Grandegger
@ 2007-04-25 12:55 ` Wolfgang Grandegger
2007-04-25 13:35 ` Sergei Shtylyov
1 sibling, 1 reply; 12+ messages in thread
From: Wolfgang Grandegger @ 2007-04-25 12:55 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: linuxppc-embedded
Sergei Shtylyov wrote:
> Hello, I 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?
Wolfgang.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Flat device tree definitions for FLASH and MTD partitioning
2007-04-25 12:55 ` Wolfgang Grandegger
@ 2007-04-25 13:35 ` Sergei Shtylyov
2007-04-25 14:02 ` Wolfgang Grandegger
0 siblings, 1 reply; 12+ messages in thread
From: Sergei Shtylyov @ 2007-04-25 13:35 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: linuxppc-embedded
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?
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.
> Wolfgang.
MBR, Sergei
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Flat device tree definitions for FLASH and MTD partitioning
2007-04-25 13:35 ` Sergei Shtylyov
@ 2007-04-25 14:02 ` Wolfgang Grandegger
2007-04-25 14:34 ` Sergei Shtylyov
0 siblings, 1 reply; 12+ messages in thread
From: Wolfgang Grandegger @ 2007-04-25 14:02 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: linuxppc-embedded
Sergei Shtylyov wrote:
> 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?
>
> 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.
Wolfgang.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Flat device tree definitions for FLASH and MTD partitioning
2007-04-25 14:02 ` Wolfgang Grandegger
@ 2007-04-25 14:34 ` Sergei Shtylyov
2007-04-25 18:57 ` Wolfgang Grandegger
2007-04-26 8:21 ` Wolfgang Grandegger
0 siblings, 2 replies; 12+ messages in thread
From: Sergei Shtylyov @ 2007-04-25 14:34 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: linuxppc-embedded
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Flat device tree definitions for FLASH and MTD partitioning
2007-04-25 14:34 ` Sergei Shtylyov
@ 2007-04-25 18:57 ` Wolfgang Grandegger
2007-04-26 8:21 ` Wolfgang Grandegger
1 sibling, 0 replies; 12+ messages in thread
From: Wolfgang Grandegger @ 2007-04-25 18:57 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: linuxppc-embedded
Sergei Shtylyov wrote:
> 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?
Well, I was wrong. In the meantime I realized that physmap can handle
flash region compiosed of multiple banks. Sorry for the noise.
Wolfgang.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Flat device tree definitions for FLASH and MTD partitioning
2007-04-25 14:34 ` Sergei Shtylyov
2007-04-25 18:57 ` Wolfgang Grandegger
@ 2007-04-26 8:21 ` Wolfgang Grandegger
2007-04-26 12:36 ` Sergei Shtylyov
1 sibling, 1 reply; 12+ messages in thread
From: Wolfgang Grandegger @ 2007-04-26 8:21 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: linuxppc-embedded
Sergei Shtylyov wrote:
> 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).
Yes, I know and I also wondered why an "_" is used for the device type.
>>> 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?
To complete this thread, physmap_of can map _one_ FLASH region composed
of one or more FLASH banks. But it currently cannot map more than _one_
FLASH region. It would be nice to extend it for multiple FLASH
definitions (could code it when time permits).
Wolfgang.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Flat device tree definitions for FLASH and MTD partitioning
2007-04-26 8:21 ` Wolfgang Grandegger
@ 2007-04-26 12:36 ` Sergei Shtylyov
2007-04-26 12:59 ` Wolfgang Grandegger
0 siblings, 1 reply; 12+ messages in thread
From: Sergei Shtylyov @ 2007-04-26 12:36 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: linuxppc-embedded
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).
> Yes, I know and I also wondered why an "_" is used for the device type.
Ask the OF spec. developers. :-)
>>>> 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?
> To complete this thread, physmap_of can map _one_ FLASH region composed
> of one or more FLASH banks. But it currently cannot map more than _one_
> FLASH region.
I wodner why?! :-O
> It would be nice to extend it for multiple FLASH
> definitions (could code it when time permits).
I'm seeing nothing that prevents it from working now -- it should register as much "rom" devices as you supply via the device tree.
> Wolfgang.
MBR, Sergei
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Flat device tree definitions for FLASH and MTD partitioning
2007-04-26 12:36 ` Sergei Shtylyov
@ 2007-04-26 12:59 ` Wolfgang Grandegger
0 siblings, 0 replies; 12+ messages in thread
From: Wolfgang Grandegger @ 2007-04-26 12:59 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: linuxppc-embedded
Sergei Shtylyov wrote:
> 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).
>
>> Yes, I know and I also wondered why an "_" is used for the device type.
>
> Ask the OF spec. developers. :-)
>
>>>>> 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?
>
>> To complete this thread, physmap_of can map _one_ FLASH region
>> composed of one or more FLASH banks. But it currently cannot map more
>> than _one_ FLASH region.
>
> I wodner why?! :-O
I know as well ;-).
>> It would be nice to extend it for multiple FLASH definitions (could
>> code it when time permits).
>
> I'm seeing nothing that prevents it from working now -- it should
> register as much "rom" devices as you supply via the device tree.
OK, I see, for each registered direct-mapped flash resource,
of_physmap_probe() will be called.
Thanks.
Wolfgang.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2007-04-26 12:56 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-08 11:37 Flat device tree definitions for FLASH and MTD partitioning Wolfgang Grandegger
2007-04-08 12:11 ` Sergei Shtylyov
2007-04-08 12:21 ` Sergei Shtylyov
2007-04-08 12:41 ` Wolfgang Grandegger
2007-04-25 12:55 ` Wolfgang Grandegger
2007-04-25 13:35 ` Sergei Shtylyov
2007-04-25 14:02 ` Wolfgang Grandegger
2007-04-25 14:34 ` Sergei Shtylyov
2007-04-25 18:57 ` Wolfgang Grandegger
2007-04-26 8:21 ` Wolfgang Grandegger
2007-04-26 12:36 ` Sergei Shtylyov
2007-04-26 12:59 ` Wolfgang Grandegger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).