Skip to contentSkip to conversation

powerpc: dts: Fix canyonlands EMAC interrupt map

PATCH Tanmay Inamdar 4 participants 8 messages Nov 22, 2011 – Nov 23, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Fixing interrupt mapping of EMAC for canyonlands

---
 arch/powerpc/boot/dts/canyonlands.dts |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)
arch/powerpc/boot/dts/canyonlands.dts +6 -10
index 3dc75de..c76bbcd 100644
@@ -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>;
Signature · 1 line
1.6.1.rc3
#1 lore raw
Quoted 3 lines · Tanmay Inamdar

Fixing interrupt mapping of EMAC for canyonlands

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

Quoted 51 lines

---
 arch/powerpc/boot/dts/canyonlands.dts |   16 ++++++----------

 1 files changed, 6 insertions(+), 10 deletions(-)
arch/powerpc/boot/dts/canyonlands.dts +3 -5
index 3dc75de..c76bbcd 100644
@@ -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>;

arch/powerpc/boot/dts/canyonlands.dts +3 -5
@@ -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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

#2 lore raw
Quoted 9 lines · Josh Boyer
Quoted 3 lines · Tanmay Inamdar

Fixing interrupt mapping of EMAC for canyonlands

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.

If you think "clear up" is fine, then please go ahead.

Thanks,
Tanmay

Quoted 52 lines

josh

Review

Quoted 5 lines
---
 arch/powerpc/boot/dts/canyonlands.dts |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)
(quoted diff) +0 -0

b/arch/powerpc/boot/dts/canyonlands.dts

arch/powerpc/boot/dts/canyonlands.dts line 362

Quoted 7 lines

index 3dc75de..c76bbcd 100644

arch/powerpc/boot/dts/canyonlands.dts +0 -0
@@ -360,13 +360,11 @@
                       EMAC0: ethernet@ef600e00 {
                               device_type = "network";
                               compatible = "ibm,emac-460ex",

"ibm,emac4sync";

arch/powerpc/boot/dts/canyonlands.dts

Quoted 7 lines
arch/powerpc/boot/dts/canyonlands.dts +1 -4
-                               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

arch/powerpc/boot/dts/canyonlands.dts line 369

Quoted 1 line
arch/powerpc/boot/dts/canyonlands.dts +0 -1
-                                                /*Wake*/   0x1 &UIC2

0x14 0x4>;

arch/powerpc/boot/dts/canyonlands.dts

Quoted 4 lines
arch/powerpc/boot/dts/canyonlands.dts +2 -0
+                               interrupts = </*Status*/0x10 0x4
+                                               /*Wake*/0x14 0x4>;
                               reg = <0xef600e00 0x000000c4>;
                               local-mac-address = [000000000000]; /*

Filled in by U-Boot */

arch/powerpc/boot/dts/canyonlands.dts line 390

Quoted 5 lines
arch/powerpc/boot/dts/canyonlands.dts +0 -0
                               mal-device = <&MAL0>;
@@ -390,13 +388,11 @@
                       EMAC1: ethernet@ef600f00 {
                               device_type = "network";
                               compatible = "ibm,emac-460ex",

"ibm,emac4sync";

arch/powerpc/boot/dts/canyonlands.dts

Quoted 7 lines
arch/powerpc/boot/dts/canyonlands.dts +1 -4
-                               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

arch/powerpc/boot/dts/canyonlands.dts line 399

Quoted 1 line
arch/powerpc/boot/dts/canyonlands.dts +0 -1
-                                                /*Wake*/   0x1 &UIC2

0x15 0x4>;

arch/powerpc/boot/dts/canyonlands.dts

Quoted 4 lines
arch/powerpc/boot/dts/canyonlands.dts +2 -0
+                               interrupts = </*Status*/0x11 0x4
+                                               /*Wake*/0x15 0x4>;
                               reg = <0xef600f00 0x000000c4>;
                               local-mac-address = [000000000000]; /*
Quoted 13 lines

Filled in by U-Boot */

Quoted 6 lines
arch/powerpc/boot/dts/canyonlands.dts +0 -1
                               mal-device = <&MAL0>;
--

1.6.1.rc3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel"

in

Quoted 4 lines

the body of a message to [email protected]
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.

#3 lore raw
Quoted 8 lines · Tanmay Inamdar
Quoted 6 lines · Josh Boyer
Quoted 3 lines · Tanmay Inamdar

Fixing interrupt mapping of EMAC for canyonlands

Quoted 8 lines
Quoted 3 lines

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

#4 lore raw
In reply to Tanmay Inamdar
Quoted 15 lines · Tanmay Inamdar

On Tue, Nov 22, 2011 at 5:00 PM, Josh Boyer <[email protected]> wrote:
On Tue, Nov 22, 2011 at 2:11 AM, Tanmay Inamdar <[email protected]> wrote:
> Fixing interrupt mapping of EMAC for canyonlands >
> Signed-off-by: Tanmay Inamdar <[email protected]>

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?

Quoted 3 lines

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.

Quoted 87 lines

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 [email protected]
        > 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.

#5 lore raw
In reply to Tanmay Inamdar
Quoted 1 line · Tanmay Inamdar

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.

Quoted 43 lines
---
 arch/powerpc/boot/dts/canyonlands.dts |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)
arch/powerpc/boot/dts/canyonlands.dts +6 -10
index 3dc75de..c76bbcd 100644
@@ -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>;
#6 lore raw
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 1 line · Tanmay Inamdar

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.

Signature · 4 lines
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
#7 lore raw
Quoted 6 lines · David Gibson
Quoted 5 lines · Benjamin Herrenschmidt
Quoted 1 line · Tanmay Inamdar

Fixing interrupt mapping of EMAC for canyonlands

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

Quoted 8 lines
Quoted 3 lines

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.