LKML Archive mirror
 help / color / mirror / Atom feed
* powerpc: dts: Fix canyonlands EMAC interrupt map
@ 2011-11-22  7:11 Tanmay Inamdar
  2011-11-22 11:30 ` Josh Boyer
  2011-11-22 21:16 ` Benjamin Herrenschmidt
  0 siblings, 2 replies; 7+ messages in thread
From: Tanmay Inamdar @ 2011-11-22  7:11 UTC (permalink / raw
  To: benh; +Cc: linuxppc-dev, linux-kernel, Tanmay Inamdar

Fixing interrupt mapping of EMAC for canyonlands

Signed-off-by: Tanmay Inamdar <tinamdar@apm.com>
---
 arch/powerpc/boot/dts/canyonlands.dts |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/arch/powerpc/boot/dts/canyonlands.dts b/arch/powerpc/boot/dts/canyonlands.dts
index 3dc75de..c76bbcd 100644
--- a/arch/powerpc/boot/dts/canyonlands.dts
+++ b/arch/powerpc/boot/dts/canyonlands.dts
@@ -360,13 +360,11 @@
 			EMAC0: ethernet@ef600e00 {
 				device_type = "network";
 				compatible = "ibm,emac-460ex", "ibm,emac4sync";
-				interrupt-parent = <&EMAC0>;
-				interrupts = <0x0 0x1>;
-				#interrupt-cells = <1>;
+				interrupt-parent = <&UIC2>;
 				#address-cells = <0>;
 				#size-cells = <0>;
-				interrupt-map = </*Status*/ 0x0 &UIC2 0x10 0x4
-						 /*Wake*/   0x1 &UIC2 0x14 0x4>;
+				interrupts = </*Status*/0x10 0x4
+						/*Wake*/0x14 0x4>;
 				reg = <0xef600e00 0x000000c4>;
 				local-mac-address = [000000000000]; /* Filled in by U-Boot */
 				mal-device = <&MAL0>;
@@ -390,13 +388,11 @@
 			EMAC1: ethernet@ef600f00 {
 				device_type = "network";
 				compatible = "ibm,emac-460ex", "ibm,emac4sync";
-				interrupt-parent = <&EMAC1>;
-				interrupts = <0x0 0x1>;
-				#interrupt-cells = <1>;
+				interrupt-parent = <&UIC2>;
 				#address-cells = <0>;
 				#size-cells = <0>;
-				interrupt-map = </*Status*/ 0x0 &UIC2 0x11 0x4
-						 /*Wake*/   0x1 &UIC2 0x15 0x4>;
+				interrupts = </*Status*/0x11 0x4
+						/*Wake*/0x15 0x4>;
 				reg = <0xef600f00 0x000000c4>;
 				local-mac-address = [000000000000]; /* Filled in by U-Boot */
 				mal-device = <&MAL0>;
-- 
1.6.1.rc3


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

* Re: powerpc: dts: Fix canyonlands EMAC interrupt map
  2011-11-22  7:11 powerpc: dts: Fix canyonlands EMAC interrupt map Tanmay Inamdar
@ 2011-11-22 11:30 ` Josh Boyer
       [not found]   ` <CACoXjc=RBpB6eYu1zB-kCcYmsV8rdbzYtdxyBJDLTdt6uu04ig@mail.gmail.com>
  2011-11-22 21:16 ` Benjamin Herrenschmidt
  1 sibling, 1 reply; 7+ messages in thread
From: Josh Boyer @ 2011-11-22 11:30 UTC (permalink / raw
  To: Tanmay Inamdar; +Cc: benh, linuxppc-dev, linux-kernel

On Tue, Nov 22, 2011 at 2:11 AM, Tanmay Inamdar <tinamdar@apm.com> wrote:
> Fixing interrupt mapping of EMAC for canyonlands
>
> Signed-off-by: Tanmay Inamdar <tinamdar@apm.com>

As far as I can tell, your changes aren't really changing anything
just making it a bit clearer, correct?  If so, do you mind if I change
the commit log to "clear up" instead of fix?

josh

> ---
>  arch/powerpc/boot/dts/canyonlands.dts |   16 ++++++----------
>  1 files changed, 6 insertions(+), 10 deletions(-)
>
> diff --git a/arch/powerpc/boot/dts/canyonlands.dts b/arch/powerpc/boot/dts/canyonlands.dts
> index 3dc75de..c76bbcd 100644
> --- a/arch/powerpc/boot/dts/canyonlands.dts
> +++ b/arch/powerpc/boot/dts/canyonlands.dts
> @@ -360,13 +360,11 @@
>                        EMAC0: ethernet@ef600e00 {
>                                device_type = "network";
>                                compatible = "ibm,emac-460ex", "ibm,emac4sync";
> -                               interrupt-parent = <&EMAC0>;
> -                               interrupts = <0x0 0x1>;
> -                               #interrupt-cells = <1>;
> +                               interrupt-parent = <&UIC2>;
>                                #address-cells = <0>;
>                                #size-cells = <0>;
> -                               interrupt-map = </*Status*/ 0x0 &UIC2 0x10 0x4
> -                                                /*Wake*/   0x1 &UIC2 0x14 0x4>;
> +                               interrupts = </*Status*/0x10 0x4
> +                                               /*Wake*/0x14 0x4>;
>                                reg = <0xef600e00 0x000000c4>;
>                                local-mac-address = [000000000000]; /* Filled in by U-Boot */
>                                mal-device = <&MAL0>;
> @@ -390,13 +388,11 @@
>                        EMAC1: ethernet@ef600f00 {
>                                device_type = "network";
>                                compatible = "ibm,emac-460ex", "ibm,emac4sync";
> -                               interrupt-parent = <&EMAC1>;
> -                               interrupts = <0x0 0x1>;
> -                               #interrupt-cells = <1>;
> +                               interrupt-parent = <&UIC2>;
>                                #address-cells = <0>;
>                                #size-cells = <0>;
> -                               interrupt-map = </*Status*/ 0x0 &UIC2 0x11 0x4
> -                                                /*Wake*/   0x1 &UIC2 0x15 0x4>;
> +                               interrupts = </*Status*/0x11 0x4
> +                                               /*Wake*/0x15 0x4>;
>                                reg = <0xef600f00 0x000000c4>;
>                                local-mac-address = [000000000000]; /* Filled in by U-Boot */
>                                mal-device = <&MAL0>;
> --
> 1.6.1.rc3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

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

* Re: powerpc: dts: Fix canyonlands EMAC interrupt map
       [not found]   ` <CACoXjc=RBpB6eYu1zB-kCcYmsV8rdbzYtdxyBJDLTdt6uu04ig@mail.gmail.com>
@ 2011-11-22 14:31     ` Josh Boyer
  2011-11-22 22:05     ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 7+ messages in thread
From: Josh Boyer @ 2011-11-22 14:31 UTC (permalink / raw
  To: Tanmay Inamdar; +Cc: benh, linuxppc-dev, linux-kernel

On Tue, Nov 22, 2011 at 9:15 AM, Tanmay Inamdar <tinamdar@apm.com> wrote:
>
> On Tue, Nov 22, 2011 at 5:00 PM, Josh Boyer <jwboyer@gmail.com> wrote:
>>
>> On Tue, Nov 22, 2011 at 2:11 AM, Tanmay Inamdar <tinamdar@apm.com> wrote:
>> > Fixing interrupt mapping of EMAC for canyonlands
>> >
>> > Signed-off-by: Tanmay Inamdar <tinamdar@apm.com>
>>
>> As far as I can tell, your changes aren't really changing anything
>> just making it a bit clearer, correct?  If so, do you mind if I change
>> the commit log to "clear up" instead of fix?
>
> Actually Rob Herring's commit
> (http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=dc9372808412edbc653a675a526c2ee6c0c14a91)
> breaks the interrupt mapping in EMAC driver.
> I am trying to fix this issue by mapping interrupts in different way.

I see.  That should have been in the commit log then.  I'll add
something like that to it.

josh

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

* Re: powerpc: dts: Fix canyonlands EMAC interrupt map
  2011-11-22  7:11 powerpc: dts: Fix canyonlands EMAC interrupt map Tanmay Inamdar
  2011-11-22 11:30 ` Josh Boyer
@ 2011-11-22 21:16 ` Benjamin Herrenschmidt
  2011-11-23  1:15   ` David Gibson
  1 sibling, 1 reply; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2011-11-22 21:16 UTC (permalink / raw
  To: Tanmay Inamdar; +Cc: linuxppc-dev, linux-kernel

On Tue, 2011-11-22 at 12:41 +0530, Tanmay Inamdar wrote:
> Fixing interrupt mapping of EMAC for canyonlands

The previous stuff was odd .... but was it broken ?

It was done this way because the EMAC actually has more interrupts than
that which are routed to different UICs, and so doing a local map this
way allows to target multiple parents.

Cheers,
Ben.

> Signed-off-by: Tanmay Inamdar <tinamdar@apm.com>
> ---
>  arch/powerpc/boot/dts/canyonlands.dts |   16 ++++++----------
>  1 files changed, 6 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/powerpc/boot/dts/canyonlands.dts b/arch/powerpc/boot/dts/canyonlands.dts
> index 3dc75de..c76bbcd 100644
> --- a/arch/powerpc/boot/dts/canyonlands.dts
> +++ b/arch/powerpc/boot/dts/canyonlands.dts
> @@ -360,13 +360,11 @@
>  			EMAC0: ethernet@ef600e00 {
>  				device_type = "network";
>  				compatible = "ibm,emac-460ex", "ibm,emac4sync";
> -				interrupt-parent = <&EMAC0>;
> -				interrupts = <0x0 0x1>;
> -				#interrupt-cells = <1>;
> +				interrupt-parent = <&UIC2>;
>  				#address-cells = <0>;
>  				#size-cells = <0>;
> -				interrupt-map = </*Status*/ 0x0 &UIC2 0x10 0x4
> -						 /*Wake*/   0x1 &UIC2 0x14 0x4>;
> +				interrupts = </*Status*/0x10 0x4
> +						/*Wake*/0x14 0x4>;
>  				reg = <0xef600e00 0x000000c4>;
>  				local-mac-address = [000000000000]; /* Filled in by U-Boot */
>  				mal-device = <&MAL0>;
> @@ -390,13 +388,11 @@
>  			EMAC1: ethernet@ef600f00 {
>  				device_type = "network";
>  				compatible = "ibm,emac-460ex", "ibm,emac4sync";
> -				interrupt-parent = <&EMAC1>;
> -				interrupts = <0x0 0x1>;
> -				#interrupt-cells = <1>;
> +				interrupt-parent = <&UIC2>;
>  				#address-cells = <0>;
>  				#size-cells = <0>;
> -				interrupt-map = </*Status*/ 0x0 &UIC2 0x11 0x4
> -						 /*Wake*/   0x1 &UIC2 0x15 0x4>;
> +				interrupts = </*Status*/0x11 0x4
> +						/*Wake*/0x15 0x4>;
>  				reg = <0xef600f00 0x000000c4>;
>  				local-mac-address = [000000000000]; /* Filled in by U-Boot */
>  				mal-device = <&MAL0>;



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

* Re: powerpc: dts: Fix canyonlands EMAC interrupt map
       [not found]   ` <CACoXjc=RBpB6eYu1zB-kCcYmsV8rdbzYtdxyBJDLTdt6uu04ig@mail.gmail.com>
  2011-11-22 14:31     ` Josh Boyer
@ 2011-11-22 22:05     ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2011-11-22 22:05 UTC (permalink / raw
  To: Tanmay Inamdar; +Cc: Josh Boyer, linuxppc-dev, linux-kernel, Rob Herring

On Tue, 2011-11-22 at 19:45 +0530, Tanmay Inamdar wrote:
> 
> On Tue, Nov 22, 2011 at 5:00 PM, Josh Boyer <jwboyer@gmail.com> wrote:
>         On Tue, Nov 22, 2011 at 2:11 AM, Tanmay Inamdar
>         <tinamdar@apm.com> wrote:
>         > Fixing interrupt mapping of EMAC for canyonlands
>         >
>         > Signed-off-by: Tanmay Inamdar <tinamdar@apm.com>
>         
>         
>         As far as I can tell, your changes aren't really changing
>         anything
>         just making it a bit clearer, correct?  If so, do you mind if
>         I change
>         the commit log to "clear up" instead of fix?
> 
> Actually Rob Herring's commit
> (http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=dc9372808412edbc653a675a526c2ee6c0c14a91) breaks the interrupt mapping in EMAC driver.
> I am trying to fix this issue by mapping interrupts in different way.

No. This commit needs to be reverted. It breaks existing practices.
Pointing to yourself as a parent in order to provide a map is an old
trick and it should be supported.

I'll ask Linus to revert.

Cheers,
Ben.

> If you think "clear up" is fine, then please go ahead.
> 
> Thanks,
> Tanmay
> 
>         
>         josh
>         
>         
>         > ---
>         >  arch/powerpc/boot/dts/canyonlands.dts |   16
>         ++++++----------
>         >  1 files changed, 6 insertions(+), 10 deletions(-)
>         >
>         > diff --git a/arch/powerpc/boot/dts/canyonlands.dts
>         b/arch/powerpc/boot/dts/canyonlands.dts
>         > index 3dc75de..c76bbcd 100644
>         > --- a/arch/powerpc/boot/dts/canyonlands.dts
>         > +++ b/arch/powerpc/boot/dts/canyonlands.dts
>         > @@ -360,13 +360,11 @@
>         >                        EMAC0: ethernet@ef600e00 {
>         >                                device_type = "network";
>         >                                compatible =
>         "ibm,emac-460ex", "ibm,emac4sync";
>         > -                               interrupt-parent = <&EMAC0>;
>         > -                               interrupts = <0x0 0x1>;
>         > -                               #interrupt-cells = <1>;
>         > +                               interrupt-parent = <&UIC2>;
>         >                                #address-cells = <0>;
>         >                                #size-cells = <0>;
>         > -                               interrupt-map = </*Status*/
>         0x0 &UIC2 0x10 0x4
>         > -                                                /*Wake*/
>         0x1 &UIC2 0x14 0x4>;
>         > +                               interrupts = </*Status*/0x10
>         0x4
>         > +                                               /*Wake*/0x14
>         0x4>;
>         >                                reg = <0xef600e00
>         0x000000c4>;
>         >                                local-mac-address =
>         [000000000000]; /* Filled in by U-Boot */
>         >                                mal-device = <&MAL0>;
>         > @@ -390,13 +388,11 @@
>         >                        EMAC1: ethernet@ef600f00 {
>         >                                device_type = "network";
>         >                                compatible =
>         "ibm,emac-460ex", "ibm,emac4sync";
>         > -                               interrupt-parent = <&EMAC1>;
>         > -                               interrupts = <0x0 0x1>;
>         > -                               #interrupt-cells = <1>;
>         > +                               interrupt-parent = <&UIC2>;
>         >                                #address-cells = <0>;
>         >                                #size-cells = <0>;
>         > -                               interrupt-map = </*Status*/
>         0x0 &UIC2 0x11 0x4
>         > -                                                /*Wake*/
>         0x1 &UIC2 0x15 0x4>;
>         > +                               interrupts = </*Status*/0x11
>         0x4
>         > +                                               /*Wake*/0x15
>         0x4>;
>         >                                reg = <0xef600f00
>         0x000000c4>;
>         >                                local-mac-address =
>         [000000000000]; /* Filled in by U-Boot */
>         >                                mal-device = <&MAL0>;
>         > --
>         > 1.6.1.rc3
>         >
>         
>         > --
>         > To unsubscribe from this list: send the line "unsubscribe
>         linux-kernel" in
>         > the body of a message to majordomo@vger.kernel.org
>         > More majordomo info at
>          http://vger.kernel.org/majordomo-info.html
>         > Please read the FAQ at  http://www.tux.org/lkml/
>         >
> 
> CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, 
> is for the sole use of the intended recipient(s) and contains information 
> that is confidential and proprietary to AppliedMicro Corporation or its subsidiaries. 
> It is to be used solely for the purpose of furthering the parties' business relationship. 
> All unauthorized review, use, disclosure or distribution is prohibited. 
> If you are not the intended recipient, please contact the sender by reply e-mail 
> and destroy all copies of the original message.



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

* Re: powerpc: dts: Fix canyonlands EMAC interrupt map
  2011-11-22 21:16 ` Benjamin Herrenschmidt
@ 2011-11-23  1:15   ` David Gibson
  2011-11-23  1:42     ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 7+ messages in thread
From: David Gibson @ 2011-11-23  1:15 UTC (permalink / raw
  To: Benjamin Herrenschmidt; +Cc: Tanmay Inamdar, linuxppc-dev, linux-kernel

On Wed, Nov 23, 2011 at 08:16:40AM +1100, Benjamin Herrenschmidt wrote:
> On Tue, 2011-11-22 at 12:41 +0530, Tanmay Inamdar wrote:
> > Fixing interrupt mapping of EMAC for canyonlands
> 
> The previous stuff was odd .... but was it broken ?
> 
> It was done this way because the EMAC actually has more interrupts than
> that which are routed to different UICs, and so doing a local map this
> way allows to target multiple parents.

Well, in the canyonlands case, it appears that the interrupts went to
the same pic, so the simpler representation should be correct as
well.  However, there certainly are boards where they go to multiple
pics, so we need this interrupt-map trick.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: powerpc: dts: Fix canyonlands EMAC interrupt map
  2011-11-23  1:15   ` David Gibson
@ 2011-11-23  1:42     ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2011-11-23  1:42 UTC (permalink / raw
  To: David Gibson; +Cc: Tanmay Inamdar, linuxppc-dev, linux-kernel

On Wed, 2011-11-23 at 12:15 +1100, David Gibson wrote:
> On Wed, Nov 23, 2011 at 08:16:40AM +1100, Benjamin Herrenschmidt wrote:
> > On Tue, 2011-11-22 at 12:41 +0530, Tanmay Inamdar wrote:
> > > Fixing interrupt mapping of EMAC for canyonlands
> > 
> > The previous stuff was odd .... but was it broken ?
> > 
> > It was done this way because the EMAC actually has more interrupts than
> > that which are routed to different UICs, and so doing a local map this
> > way allows to target multiple parents.
> 
> Well, in the canyonlands case, it appears that the interrupts went to
> the same pic, so the simpler representation should be correct as
> well.  However, there certainly are boards where they go to multiple
> pics, so we need this interrupt-map trick.

Doesn't emac has something like 4 more interrupts that we simply haven't
been bothered wiring up (because we don't use them ?)

Cheers,
Ben.



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

end of thread, other threads:[~2011-11-23  1:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-22  7:11 powerpc: dts: Fix canyonlands EMAC interrupt map Tanmay Inamdar
2011-11-22 11:30 ` Josh Boyer
     [not found]   ` <CACoXjc=RBpB6eYu1zB-kCcYmsV8rdbzYtdxyBJDLTdt6uu04ig@mail.gmail.com>
2011-11-22 14:31     ` Josh Boyer
2011-11-22 22:05     ` Benjamin Herrenschmidt
2011-11-22 21:16 ` Benjamin Herrenschmidt
2011-11-23  1:15   ` David Gibson
2011-11-23  1:42     ` 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 read-only IMAP folder(s) and NNTP newsgroup(s).