Skip to contentSkip to conversation

Add L2 cache node to AMCC Taishan dts file

PATCH Superseded Stefan Roese 3 participants 5 messages Mar 18, 2008 – Mar 19, 2008

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 Add L2 cache node to AMCC Taishan dts file

This patch adds the L2 cache node to the Taishan 440GX dts file.

---
 arch/powerpc/boot/dts/taishan.dts     |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
arch/powerpc/boot/dts/taishan.dts +10 -0
index 8278068..d0bff33 100644
@@ -104,6 +104,16 @@
 		// FIXME: anything else?
 	};
 
+	L2C0: l2c@30 {
+		compatible = "ibm,l2-cache-440gx", "ibm,l2-cache";
+		dcr-reg = <20 8			/* Internal SRAM DCR's */
+			   30 8>;		/* L2 cache DCR's */
+		cache-line-size = <20>;		/* 32 bytes */
+		cache-size = <40000>;		/* L2, 256K */
+		interrupt-parent = <&UIC2>;
+		interrupts = <17 1>;
+	};
+
 	plb {
 		compatible = "ibm,plb-440gx", "ibm,plb4";
 		#address-cells = <2>;
Signature · 1 line
1.5.4.4
#1 lore raw

arch/powerpc/boot/dts/taishan.dts line 110

Quoted 4 lines
arch/powerpc/boot/dts/taishan.dts +4 -0
+	L2C0: l2c@30 {
+		compatible = "ibm,l2-cache-440gx", "ibm,l2-cache";
+		dcr-reg = <20 8			/* Internal SRAM DCR's */
+			   30 8>;		/* L2 cache DCR's */

The unit address is based on the _first_ entry in "reg". No2 this is "dcr-reg", but you don't really want to be more incompatible than necessary...

Segher

#3 lore raw
In reply to Stefan Roese
Quoted 12 lines · Stefan Roese

This patch adds the L2 cache node to the Taishan 440GX dts file.

---
 arch/powerpc/boot/dts/taishan.dts     |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
arch/powerpc/boot/dts/taishan.dts +0 -0
index 8278068..d0bff33 100644

arch/powerpc/boot/dts/taishan.dts line 107

Quoted 4 lines
arch/powerpc/boot/dts/taishan.dts +1 -0
@@ -104,6 +104,16 @@
 		// FIXME: anything else?
 	};
 
+	L2C0: l2c@30 {

A node with no reg property shouldn't have a unit address.

arch/powerpc/boot/dts/taishan.dts line 115

Quoted 8 lines
arch/powerpc/boot/dts/taishan.dts +8 -0
+		compatible = "ibm,l2-cache-440gx", "ibm,l2-cache";
+		dcr-reg = <20 8			/* Internal SRAM DCR's */
+			   30 8>;		/* L2 cache DCR's */
+		cache-line-size = <20>;		/* 32 bytes */
+		cache-size = <40000>;		/* L2, 256K */
+		interrupt-parent = <&UIC2>;
+		interrupts = <17 1>;
+	};

Now.. usually cache nodes are given as descendents of the CPU node. In this case you have the DCR control registers though, so I guess this is representing a control interface rather than the cache itself. Hrm.. not really sure how to do this.

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
#4 lore raw
Quoted 16 lines · David Gibson
Quoted 15 lines · Stefan Roese

This patch adds the L2 cache node to the Taishan 440GX dts file.

---
 arch/powerpc/boot/dts/taishan.dts     |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/arch/powerpc/boot/dts/taishan.dts index 8278068..d0bff33 100644

arch/powerpc/boot/dts/taishan.dts +0 -0
@@ -104,6 +104,16 @@
 		// FIXME: anything else?
 	};
 
Quoted 3 lines

arch/powerpc/boot/dts/taishan.dts line 107

Quoted 1 line
arch/powerpc/boot/dts/taishan.dts +1 -0
+	L2C0: l2c@30 {

A node with no reg property shouldn't have a unit address.

OK, I'll remove the unit address.

Quoted 5 lines
Quoted 5 lines
arch/powerpc/boot/dts/taishan.dts +5 -0
+		compatible = "ibm,l2-cache-440gx", "ibm,l2-cache";
+		dcr-reg = <20 8			/* Internal SRAM DCR's */
+			   30 8>;		/* L2 cache DCR's */
+		cache-line-size = <20>;		/* 32 bytes */
+		cache-size = <40000>;		/* L2, 256K */
Quoted 8 lines

arch/powerpc/boot/dts/taishan.dts line 115

Quoted 3 lines
arch/powerpc/boot/dts/taishan.dts +3 -0
+		interrupt-parent = <&UIC2>;
+		interrupts = <17 1>;
+	};

Now.. usually cache nodes are given as descendents of the CPU node. In this case you have the DCR control registers though, so I guess this is representing a control interface rather than the cache itself. Hrm.. not really sure how to do this.

So should I change the location then?

Best regards,
Stefan

#2 lore raw
In reply to Segher Boessenkool
Quoted 6 lines · Segher Boessenkool

arch/powerpc/boot/dts/taishan.dts line 110

Quoted 4 lines
arch/powerpc/boot/dts/taishan.dts +4 -0
+	L2C0: l2c@30 {
+		compatible = "ibm,l2-cache-440gx", "ibm,l2-cache";
+		dcr-reg = <20 8			/* Internal SRAM DCR's */
+			   30 8>;		/* L2 cache DCR's */

The unit address is based on the _first_ entry in "reg".

I'll remove the unit address.

Quoted 3 lines

No2 this
is "dcr-reg", but you don't really want to be more incompatible than necessary...

Sorry, I'm not sure what you're trying to tell me here.

Best regards,
Stefan