linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* open-pic device tree node and subnodes for additional functionality?
@ 2009-02-16 16:58 Kumar Gala
  2009-02-16 18:12 ` Scott Wood
  0 siblings, 1 reply; 4+ messages in thread
From: Kumar Gala @ 2009-02-16 16:58 UTC (permalink / raw)
  To: linuxppc-dev list

On Freescale open-pic controllers we have a number of additional  
features not spec'd per openpic.  (additional timers, perf mon, PCIe  
msi, message interrupts, ...).  The problem is how to identify these  
features in the device tree.

For example we have:

                 msi@41600 {
                         compatible = "fsl,mpc8572-msi", "fsl,mpic-msi";
                         reg = <0x41600 0x80>;
                         msi-available-ranges = <0 0x100>;
                         interrupts = <
                                 0xe0 0
                                 0xe1 0
                                 0xe2 0
                                 0xe3 0
                                 0xe4 0
                                 0xe5 0
                                 0xe6 0
                                 0xe7 0>;
                         interrupt-parent = <&mpic>;
                 };

                 mpic: pic@40000 {
                         interrupt-controller;
                         #address-cells = <0>;
                         #interrupt-cells = <2>;
                         reg = <0x40000 0x40000>;
                         compatible = "chrp,open-pic";
                         device_type = "open-pic";
                 };

---

should we put msi under the pic node as a child and add ranges, etc.   
The question that raises in my mind is what does the reg property end  
up meaning.  I assume it shouldn't stay as is.

- k

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: open-pic device tree node and subnodes for additional functionality?
  2009-02-16 16:58 open-pic device tree node and subnodes for additional functionality? Kumar Gala
@ 2009-02-16 18:12 ` Scott Wood
  2009-02-16 18:50   ` Kumar Gala
  0 siblings, 1 reply; 4+ messages in thread
From: Scott Wood @ 2009-02-16 18:12 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev list

On Mon, Feb 16, 2009 at 10:58:42AM -0600, Kumar Gala wrote:
> On Freescale open-pic controllers we have a number of additional  
> features not spec'd per openpic.  (additional timers, perf mon, PCIe  
> msi, message interrupts, ...).  The problem is how to identify these  
> features in the device tree.

How about adding compatible = "fsl,CHIP-mpic", "fsl,mpic" (or something
similar) to the mpic node?

> For example we have:
> 
>                 msi@41600 {
>                         compatible = "fsl,mpc8572-msi", "fsl,mpic-msi";
>                         reg = <0x41600 0x80>;
>                         msi-available-ranges = <0 0x100>;
>                         interrupts = <
>                                 0xe0 0
>                                 0xe1 0
>                                 0xe2 0
>                                 0xe3 0
>                                 0xe4 0
>                                 0xe5 0
>                                 0xe6 0
>                                 0xe7 0>;
>                         interrupt-parent = <&mpic>;
>                 };

How much of that node's content is going to differ from one Freescale
MPIC to another?

-Scott

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: open-pic device tree node and subnodes for additional functionality?
  2009-02-16 18:12 ` Scott Wood
@ 2009-02-16 18:50   ` Kumar Gala
  2009-02-19  7:14     ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Kumar Gala @ 2009-02-16 18:50 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev list


On Feb 16, 2009, at 12:12 PM, Scott Wood wrote:

> On Mon, Feb 16, 2009 at 10:58:42AM -0600, Kumar Gala wrote:
>> On Freescale open-pic controllers we have a number of additional
>> features not spec'd per openpic.  (additional timers, perf mon, PCIe
>> msi, message interrupts, ...).  The problem is how to identify these
>> features in the device tree.
>
> How about adding compatible = "fsl,CHIP-mpic", "fsl,mpic" (or  
> something
> similar) to the mpic node?
>
>> For example we have:
>>
>>                msi@41600 {
>>                        compatible = "fsl,mpc8572-msi", "fsl,mpic- 
>> msi";
>>                        reg = <0x41600 0x80>;
>>                        msi-available-ranges = <0 0x100>;
>>                        interrupts = <
>>                                0xe0 0
>>                                0xe1 0
>>                                0xe2 0
>>                                0xe3 0
>>                                0xe4 0
>>                                0xe5 0
>>                                0xe6 0
>>                                0xe7 0>;
>>                        interrupt-parent = <&mpic>;
>>                };
>
> How much of that node's content is going to differ from one Freescale
> MPIC to another?

For MSI I doubt any.  I think on some parts we might have two (or  
more) groups of MSIs.

However I want to be able to handle timers and the slightly more  
generic message interrupts.

- k

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: open-pic device tree node and subnodes for additional functionality?
  2009-02-16 18:50   ` Kumar Gala
@ 2009-02-19  7:14     ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2009-02-19  7:14 UTC (permalink / raw)
  To: Kumar Gala; +Cc: Scott Wood, linuxppc-dev list


> For MSI I doubt any.  I think on some parts we might have two (or  
> more) groups of MSIs.
> 
> However I want to be able to handle timers and the slightly more  
> generic message interrupts.

You can probably add a reg and a ranges, the reg remains the same
as today as to not inflict any collateral damage, and the ranges
represents downstream addresses to child nodes msi, timers, ...

(ie, it's no big deal if the parent "reg" somewhat overlap the
childs ranges... it's only a problem if the drivers try to request
the resources in ways that collide)

Ben.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-02-19  7:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-16 16:58 open-pic device tree node and subnodes for additional functionality? Kumar Gala
2009-02-16 18:12 ` Scott Wood
2009-02-16 18:50   ` Kumar Gala
2009-02-19  7:14     ` Benjamin Herrenschmidt

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).