Skip to contentSkip to conversation

powerpc/4xx: DTS: Add Add'l SDRAM0 Compatible and Interrupt Info

PATCH Superseded Grant Erickson 4 participants 6 messages Dec 18, 2008

Subsystems (2)

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 powerpc/4xx: DTS: Add Add'l SDRAM0 Compatible and Interrupt Info

Added additional information for type and compatibility strings and interrupt information to the SDRAM0 memory-controller device tree nodes for AMCC PowerPC 405EX[r]-based boards to facilitate binding with the new "ibm,sdram-4xx-ddr2" EDAC memory controller adapter driver.

---
As support in the associated EDAC adapter driver is added over time, similar changes will/should be made to the DTS files for boards leveraging realizations of this "ibm,sdram-4xx-ddr2" controller, including the 440SP, 440SPe, 460EX, 460GT and 460SX.

Patch v2, based on review from David Gibson, removes the 'device_type' field because it is only used for legacy OpenFirmware method interfaces and no such compatibility is warranted here. In addition, removed address- and size-cells as this node has no children.

 arch/powerpc/boot/dts/haleakala.dts |    8 +-
 arch/powerpc/boot/dts/kilauea.dts   |    8 +-
 arch/powerpc/boot/dts/makalu.dts    |    8 +-
 3 files changed, 21 insertions(+), 3 deletions(-)
arch/powerpc/boot/dts/haleakala.dts +7 -1
index 513bc43..64880ab 100644
@@ -89,8 +89,14 @@
 		clock-frequency = <0>; /* Filled in by U-Boot */
 
 		SDRAM0: memory-controller {
-			compatible = "ibm,sdram-405exr";
+			compatible = "ibm,sdram-405exr", "ibm,sdram-4xx-ddr2";
 			dcr-reg = <0x010 0x002>;
+			#interrupt-cells = <1>;
+			interrupt-parent = <&SDRAM0>;
+			interrupts = <0x0 0x1>;
+			interrupt-map = </* ECCDED Error */ 0x0 &UIC2 0x5 0x4
+					 /* ECCSEC Error */ 0x1 &UIC2 0x6 0x4>;
+			interrupt-map-mask = <0xffffffff>;
 		};
 
 		MAL0: mcmal {
arch/powerpc/boot/dts/kilauea.dts +7 -1
index dececc4..bc32b60 100644
@@ -90,8 +90,14 @@
 		clock-frequency = <0>; /* Filled in by U-Boot */
 
 		SDRAM0: memory-controller {
-			compatible = "ibm,sdram-405ex";
+			compatible = "ibm,sdram-405ex", "ibm,sdram-4xx-ddr2";
 			dcr-reg = <0x010 0x002>;
+			#interrupt-cells = <1>;
+			interrupt-parent = <&SDRAM0>;
+			interrupts = <0x0 0x1>;
+			interrupt-map = </* ECCDED Error */ 0x0 &UIC2 0x5 0x4
+					 /* ECCSEC Error */ 0x1 &UIC2 0x6 0x4>;
+			interrupt-map-mask = <0xffffffff>;
 		};
 
 		MAL0: mcmal {
arch/powerpc/boot/dts/makalu.dts +7 -1
index 945508c..472d22d 100644
@@ -90,8 +90,14 @@
 		clock-frequency = <0>; /* Filled in by U-Boot */
 
 		SDRAM0: memory-controller {
-			compatible = "ibm,sdram-405ex";
+			compatible = "ibm,sdram-405ex", "ibm,sdram-4xx-ddr2";
 			dcr-reg = <0x010 0x002>;
+			#interrupt-cells = <1>;
+			interrupt-parent = <&SDRAM0>;
+			interrupts = <0x0 0x1>;
+			interrupt-map = </* ECCDED Error */ 0x0 &UIC2 0x5 0x4
+					 /* ECCSEC Error */ 0x1 &UIC2 0x6 0x4>;
+			interrupt-map-mask = <0xffffffff>;
 		};
 
 		MAL0: mcmal {
Acked-by on v2 1/1
#1 lore raw
Quoted 6 lines · Grant Erickson

Added additional information for type and compatibility strings and interrupt information to the SDRAM0 memory-controller device tree nodes for AMCC PowerPC 405EX[r]-based boards to facilitate binding with the new "ibm,sdram-4xx-ddr2" EDAC memory controller adapter driver.

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
Acked-by on v2 1/1
#2 lore raw
In reply to Grant Erickson
Quoted 29 lines · Grant Erickson

Added additional information for type and compatibility strings and interrupt information to the SDRAM0 memory-controller device tree nodes for AMCC PowerPC 405EX[r]-based boards to facilitate binding with the new "ibm,sdram-4xx-ddr2" EDAC memory controller adapter driver.

---
As support in the associated EDAC adapter driver is added over time, similar changes will/should be made to the DTS files for boards leveraging realizations of this "ibm,sdram-4xx-ddr2" controller, including the 440SP, 440SPe, 460EX, 460GT and 460SX.

Patch v2, based on review from David Gibson, removes the 'device_type' field because it is only used for legacy OpenFirmware method interfaces and no such compatibility is warranted here. In addition, removed address- and size-cells as this node has no children.

 arch/powerpc/boot/dts/haleakala.dts |    8 +-
 arch/powerpc/boot/dts/kilauea.dts   |    8 +-
 arch/powerpc/boot/dts/makalu.dts    |    8 +-
 3 files changed, 21 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/arch/powerpc/boot/dts/haleakala.dts index 513bc43..64880ab 100644

arch/powerpc/boot/dts/haleakala.dts +0 -0
@@ -89,8 +89,14 @@
 		clock-frequency = <0>; /* Filled in by U-Boot */
 

arch/powerpc/boot/dts/haleakala.dts line 99

Quoted 10 lines
arch/powerpc/boot/dts/haleakala.dts +7 -1
 		SDRAM0: memory-controller {
-			compatible = "ibm,sdram-405exr";
+			compatible = "ibm,sdram-405exr", "ibm,sdram-4xx-ddr2";
 			dcr-reg = <0x010 0x002>;
+			#interrupt-cells = <1>;
+			interrupt-parent = <&SDRAM0>;
+			interrupts = <0x0 0x1>;
+			interrupt-map = </* ECCDED Error */ 0x0 &UIC2 0x5 0x4
+					 /* ECCSEC Error */ 0x1 &UIC2 0x6 0x4>;
+			interrupt-map-mask = <0xffffffff>;

When all interrupts are mapped the same parent, this should do as well:

			interrupt-parent = <&UIC2>;
			interrupts = <0x5 0x4	/* ECCDED Error */
				      0x6 0x4>; /* ECCSEC Error */

Other than this:

Thanks.

Best regards,
Stefan

#3 lore raw
Quoted 43 lines · Stefan Roese
Quoted 29 lines · Grant Erickson

Added additional information for type and compatibility strings and interrupt information to the SDRAM0 memory-controller device tree nodes for AMCC PowerPC 405EX[r]-based boards to facilitate binding with the new "ibm,sdram-4xx-ddr2" EDAC memory controller adapter driver.

---
As support in the associated EDAC adapter driver is added over time, similar changes will/should be made to the DTS files for boards leveraging realizations of this "ibm,sdram-4xx-ddr2" controller, including the 440SP, 440SPe, 460EX, 460GT and 460SX.

Patch v2, based on review from David Gibson, removes the 'device_type' field because it is only used for legacy OpenFirmware method interfaces and no such compatibility is warranted here. In addition, removed address- and size-cells as this node has no children.

 arch/powerpc/boot/dts/haleakala.dts |    8 +-
 arch/powerpc/boot/dts/kilauea.dts   |    8 +-
 arch/powerpc/boot/dts/makalu.dts    |    8 +-
 3 files changed, 21 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/arch/powerpc/boot/dts/haleakala.dts index 513bc43..64880ab 100644

arch/powerpc/boot/dts/haleakala.dts +0 -0
@@ -89,8 +89,14 @@
 		clock-frequency = <0>; /* Filled in by U-Boot */
 

arch/powerpc/boot/dts/haleakala.dts line 99

Quoted 10 lines
arch/powerpc/boot/dts/haleakala.dts +7 -1
 		SDRAM0: memory-controller {
-			compatible = "ibm,sdram-405exr";
+			compatible = "ibm,sdram-405exr", "ibm,sdram-4xx-ddr2";
 			dcr-reg = <0x010 0x002>;
+			#interrupt-cells = <1>;
+			interrupt-parent = <&SDRAM0>;
+			interrupts = <0x0 0x1>;
+			interrupt-map = </* ECCDED Error */ 0x0 &UIC2 0x5 0x4
+					 /* ECCSEC Error */ 0x1 &UIC2 0x6 0x4>;
+			interrupt-map-mask = <0xffffffff>;

When all interrupts are mapped the same parent, this should do as well:

Quoted 7 lines
			interrupt-parent = <&UIC2>;
			interrupts = <0x5 0x4	/* ECCDED Error */
				      0x6 0x4>; /* ECCSEC Error */

Other than this:

Yeah, I agree. Adding an interrupt map when it's not needed is just complexity that doesn't need to be there.

josh

#4 lore raw
Quoted 26 lines · Josh Boyer
Quoted 25 lines · Stefan Roese
Quoted 11 lines · Grant Erickson
(quoted diff) +0 -0

b/arch/powerpc/boot/dts/haleakala.dts index 513bc43..64880ab 100644

arch/powerpc/boot/dts/haleakala.dts +0 -0
@@ -89,8 +89,14 @@

clock-frequency = <0>; /* Filled in by U-Boot */

SDRAM0: memory-controller {

arch/powerpc/boot/dts/haleakala.dts +1 -1
-   compatible = "ibm,sdram-405exr";
+   compatible = "ibm,sdram-405exr", "ibm,sdram-4xx-ddr2";

dcr-reg = <0x010 0x002>;

arch/powerpc/boot/dts/haleakala.dts line 99

Quoted 6 lines
arch/powerpc/boot/dts/haleakala.dts +6 -0
+   #interrupt-cells = <1>;
+   interrupt-parent = <&SDRAM0>;
+   interrupts = <0x0 0x1>;
+   interrupt-map = </* ECCDED Error */ 0x0 &UIC2 0x5 0x4
+      /* ECCSEC Error */ 0x1 &UIC2 0x6 0x4>;
+   interrupt-map-mask = <0xffffffff>;

When all interrupts are mapped the same parent, this should do as well:

interrupt-parent = <&UIC2>;
interrupts = <0x5 0x4 /* ECCDED Error */

     0x6 0x4>; /* ECCSEC Error */
Quoted 6 lines
Quoted 3 lines

Other than this:

Yeah, I agree. Adding an interrupt map when it's not needed is just complexity that doesn't need to be there.

Stefan and Josh:

Quoted 1 line

From a programmatic perspective, does the above still allow the code to

index virtual interrupt indices 0 and 1 rather than 5 and 6 when calling irq_of_parse_and_map()?

Regards,

Grant

#5 lore raw
Quoted 31 lines · Grant Erickson
Quoted 30 lines · Josh Boyer
Quoted 28 lines · Stefan Roese
Quoted 11 lines · Grant Erickson
(quoted diff) +0 -0

b/arch/powerpc/boot/dts/haleakala.dts index 513bc43..64880ab 100644

arch/powerpc/boot/dts/haleakala.dts +0 -0
@@ -89,8 +89,14 @@

clock-frequency = <0>; /* Filled in by U-Boot */

SDRAM0: memory-controller {

arch/powerpc/boot/dts/haleakala.dts +1 -1
-   compatible = "ibm,sdram-405exr";
+   compatible = "ibm,sdram-405exr", "ibm,sdram-4xx-ddr2";

dcr-reg = <0x010 0x002>;

arch/powerpc/boot/dts/haleakala.dts line 99

Quoted 6 lines
arch/powerpc/boot/dts/haleakala.dts +6 -0
+   #interrupt-cells = <1>;
+   interrupt-parent = <&SDRAM0>;
+   interrupts = <0x0 0x1>;
+   interrupt-map = </* ECCDED Error */ 0x0 &UIC2 0x5 0x4
+      /* ECCSEC Error */ 0x1 &UIC2 0x6 0x4>;
+   interrupt-map-mask = <0xffffffff>;

When all interrupts are mapped the same parent, this should do as well:

interrupt-parent = <&UIC2>;
interrupts = <0x5 0x4 /* ECCDED Error */

     0x6 0x4>; /* ECCSEC Error */

Other than this:

Quoted 8 lines
Quoted 2 lines

Yeah, I agree. Adding an interrupt map when it's not needed is just complexity that doesn't need to be there.

Stefan and Josh:

From a programmatic perspective, does the above still allow the code to index virtual interrupt indices 0 and 1 rather than 5 and 6 when calling irq_of_parse_and_map()?

Yes. The index parameter to irq_of_parse_and_map is just an index into the interrupts property. So index 0 will use the first set of numbers that matches the required #interrupt-cells. In this case it's two, one for the hardware irq number and one for the level/edge/polarity settings.

josh