linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fsl/mpic: Document and use the "big-endian" device-tree flag
@ 2011-12-22 16:25 Kyle Moffett
  2012-01-04 23:22 ` Randy Dunlap
  2012-01-05 18:35 ` Kumar Gala
  0 siblings, 2 replies; 4+ messages in thread
From: Kyle Moffett @ 2011-12-22 16:25 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: Kyle Moffett, Grant Likely, Rob Herring, Randy Dunlap,
	Benjamin Herrenschmidt, Paul Mackerras, Kumar Gala,
	Lucas De Marchi, Stuart Yoder, Josh Boyer, devicetree-discuss,
	linux-doc, linux-kernel

The MPIC code checks for a "big-endian" property and sets the flag
MPIC_BIG_ENDIAN if one is present.  Unfortunately, the PowerQUICC-III
compatible device-tree does not specify it, so all of the board ports
need to manually set that flag when calling mpic_alloc().

Document the flag and add it to the pq3 device tree.  Existing code
will still need to pass the MPIC_BIG_ENDIAN flag because their dtb may
not have this property, but new platforms shouldn't need to do so.

Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
---
 .../devicetree/bindings/powerpc/fsl/mpic.txt       |    9 ++++++++-
 arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi            |    1 +
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt b/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
index 2cf38bd..ebafba2 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
@@ -56,7 +56,14 @@ PROPERTIES
           to the client.  The presence of this property also mandates
           that any initialization related to interrupt sources shall
           be limited to sources explicitly referenced in the device tree.
-       
+
+  - big-endian
+      Usage: optional
+      Value type: <empty>
+          If present the MPIC will be assumed to be big-endian.  Some
+          device-trees omit this property on MPIC nodes even when the MPIC is
+          in fact big-endian, so certain boards override this property.
+
 INTERRUPT SPECIFIER DEFINITION
 
   Interrupt specifiers consists of 4 cells encoded as
diff --git a/arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi b/arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi
index 5c80460..47f2b67 100644
--- a/arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi
+++ b/arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi
@@ -39,6 +39,7 @@ mpic: pic@40000 {
 	reg = <0x40000 0x40000>;
 	compatible = "fsl,mpic";
 	device_type = "open-pic";
+	big-endian;
 };
 
 timer@41100 {
-- 
1.7.7.3


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

* Re: [PATCH] fsl/mpic: Document and use the "big-endian" device-tree flag
  2012-01-04 23:22 ` Randy Dunlap
@ 2012-01-04 23:08   ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2012-01-04 23:08 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Kyle Moffett, linuxppc-dev, Grant Likely, Rob Herring,
	Paul Mackerras, Kumar Gala, Lucas De Marchi, Stuart Yoder,
	Josh Boyer, devicetree-discuss, linux-doc, linux-kernel

On Wed, 2012-01-04 at 15:22 -0800, Randy Dunlap wrote:
> On 12/22/2011 08:25 AM, Kyle Moffett wrote:
> > The MPIC code checks for a "big-endian" property and sets the flag
> > MPIC_BIG_ENDIAN if one is present.  Unfortunately, the PowerQUICC-III
> > compatible device-tree does not specify it, so all of the board ports
> > need to manually set that flag when calling mpic_alloc().
> > 
> > Document the flag and add it to the pq3 device tree.  Existing code
> > will still need to pass the MPIC_BIG_ENDIAN flag because their dtb may
> > not have this property, but new platforms shouldn't need to do so.
> > 
> > Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
> 
> Grant, are you merging this patch?
> I don't think I should merge the patch to arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi.

Best is to leave the whole lot to me. It's not like mpic is used
anywhere else ...

Cheers,
Ben.

> > --
> >  .../devicetree/bindings/powerpc/fsl/mpic.txt       |    9 ++++++++-
> >  arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi            |    1 +
> >  2 files changed, 9 insertions(+), 1 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt b/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
> > index 2cf38bd..ebafba2 100644
> > --- a/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
> > +++ b/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
> > @@ -56,7 +56,14 @@ PROPERTIES
> >            to the client.  The presence of this property also mandates
> >            that any initialization related to interrupt sources shall
> >            be limited to sources explicitly referenced in the device tree.
> > -       
> > +
> > +  - big-endian
> > +      Usage: optional
> > +      Value type: <empty>
> > +          If present the MPIC will be assumed to be big-endian.  Some
> > +          device-trees omit this property on MPIC nodes even when the MPIC is
> > +          in fact big-endian, so certain boards override this property.
> > +
> >  INTERRUPT SPECIFIER DEFINITION
> >  
> >    Interrupt specifiers consists of 4 cells encoded as
> > diff --git a/arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi b/arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi
> > index 5c80460..47f2b67 100644
> > --- a/arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi
> > +++ b/arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi
> > @@ -39,6 +39,7 @@ mpic: pic@40000 {
> >  	reg = <0x40000 0x40000>;
> >  	compatible = "fsl,mpic";
> >  	device_type = "open-pic";
> > +	big-endian;
> >  };
> >  
> >  timer@41100 {
> 
> 



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

* Re: [PATCH] fsl/mpic: Document and use the "big-endian" device-tree flag
  2011-12-22 16:25 [PATCH] fsl/mpic: Document and use the "big-endian" device-tree flag Kyle Moffett
@ 2012-01-04 23:22 ` Randy Dunlap
  2012-01-04 23:08   ` Benjamin Herrenschmidt
  2012-01-05 18:35 ` Kumar Gala
  1 sibling, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2012-01-04 23:22 UTC (permalink / raw)
  To: Kyle Moffett
  Cc: linuxppc-dev, Grant Likely, Rob Herring, Benjamin Herrenschmidt,
	Paul Mackerras, Kumar Gala, Lucas De Marchi, Stuart Yoder,
	Josh Boyer, devicetree-discuss, linux-doc, linux-kernel

On 12/22/2011 08:25 AM, Kyle Moffett wrote:
> The MPIC code checks for a "big-endian" property and sets the flag
> MPIC_BIG_ENDIAN if one is present.  Unfortunately, the PowerQUICC-III
> compatible device-tree does not specify it, so all of the board ports
> need to manually set that flag when calling mpic_alloc().
> 
> Document the flag and add it to the pq3 device tree.  Existing code
> will still need to pass the MPIC_BIG_ENDIAN flag because their dtb may
> not have this property, but new platforms shouldn't need to do so.
> 
> Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>

Grant, are you merging this patch?
I don't think I should merge the patch to arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi.

> ---
>  .../devicetree/bindings/powerpc/fsl/mpic.txt       |    9 ++++++++-
>  arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi            |    1 +
>  2 files changed, 9 insertions(+), 1 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt b/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
> index 2cf38bd..ebafba2 100644
> --- a/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
> +++ b/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
> @@ -56,7 +56,14 @@ PROPERTIES
>            to the client.  The presence of this property also mandates
>            that any initialization related to interrupt sources shall
>            be limited to sources explicitly referenced in the device tree.
> -       
> +
> +  - big-endian
> +      Usage: optional
> +      Value type: <empty>
> +          If present the MPIC will be assumed to be big-endian.  Some
> +          device-trees omit this property on MPIC nodes even when the MPIC is
> +          in fact big-endian, so certain boards override this property.
> +
>  INTERRUPT SPECIFIER DEFINITION
>  
>    Interrupt specifiers consists of 4 cells encoded as
> diff --git a/arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi b/arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi
> index 5c80460..47f2b67 100644
> --- a/arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi
> @@ -39,6 +39,7 @@ mpic: pic@40000 {
>  	reg = <0x40000 0x40000>;
>  	compatible = "fsl,mpic";
>  	device_type = "open-pic";
> +	big-endian;
>  };
>  
>  timer@41100 {


-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

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

* Re: [PATCH] fsl/mpic: Document and use the "big-endian" device-tree flag
  2011-12-22 16:25 [PATCH] fsl/mpic: Document and use the "big-endian" device-tree flag Kyle Moffett
  2012-01-04 23:22 ` Randy Dunlap
@ 2012-01-05 18:35 ` Kumar Gala
  1 sibling, 0 replies; 4+ messages in thread
From: Kumar Gala @ 2012-01-05 18:35 UTC (permalink / raw)
  To: Kyle Moffett
  Cc: linuxppc-dev, Grant Likely, Rob Herring, Randy Dunlap,
	Benjamin Herrenschmidt, Paul Mackerras, Lucas De Marchi,
	Stuart Yoder, Josh Boyer, devicetree-discuss, linux-doc,
	linux-kernel


On Dec 22, 2011, at 10:25 AM, Kyle Moffett wrote:

> The MPIC code checks for a "big-endian" property and sets the flag
> MPIC_BIG_ENDIAN if one is present.  Unfortunately, the PowerQUICC-III
> compatible device-tree does not specify it, so all of the board ports
> need to manually set that flag when calling mpic_alloc().
> 
> Document the flag and add it to the pq3 device tree.  Existing code
> will still need to pass the MPIC_BIG_ENDIAN flag because their dtb may
> not have this property, but new platforms shouldn't need to do so.
> 
> Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
> ---
> .../devicetree/bindings/powerpc/fsl/mpic.txt       |    9 ++++++++-
> arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi            |    1 +
> 2 files changed, 9 insertions(+), 1 deletions(-)

need to update arch/powerpc/boot/dts/fsl/qoriq-mpic.dtsi

- k

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

end of thread, other threads:[~2012-01-05 18:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-22 16:25 [PATCH] fsl/mpic: Document and use the "big-endian" device-tree flag Kyle Moffett
2012-01-04 23:22 ` Randy Dunlap
2012-01-04 23:08   ` Benjamin Herrenschmidt
2012-01-05 18:35 ` Kumar Gala

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