Skip to contentSkip to conversation

update crypto node definition and device tree instances

PATCH Superseded Kim Phillips 3 participants 4 messages May 29, 2008 – May 30, 2008

Subsystems (3)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 update crypto node definition and device tree instances

delete obsolete device-type property, delete model property (use compatible property instead), prepend "fsl," to Freescale specific properties. Add nodes to device trees that are missing them, and fix broken property values in other trees.

---
 Documentation/powerpc/booting-without-of.txt |   51 +++++++++++++-------------
 arch/powerpc/boot/dts/mpc8272ads.dts         |   21 ++++-------
 arch/powerpc/boot/dts/mpc8313erdb.dts        |   15 +++-----
 arch/powerpc/boot/dts/mpc8315erdb.dts        |   15 ++++----
 arch/powerpc/boot/dts/mpc832x_mds.dts        |   15 +++-----
 arch/powerpc/boot/dts/mpc832x_rdb.dts        |   15 +++-----
 arch/powerpc/boot/dts/mpc8349emitx.dts       |   12 +++----
 arch/powerpc/boot/dts/mpc8349emitxgp.dts     |   12 +++----
 arch/powerpc/boot/dts/mpc834x_mds.dts        |   15 +++-----
 arch/powerpc/boot/dts/mpc836x_mds.dts        |   13 +++----
 arch/powerpc/boot/dts/mpc8377_mds.dts        |   13 +++----
 arch/powerpc/boot/dts/mpc8377_rdb.dts        |   14 +++----
 arch/powerpc/boot/dts/mpc8378_mds.dts        |   13 +++----
 arch/powerpc/boot/dts/mpc8378_rdb.dts        |   14 +++----
 arch/powerpc/boot/dts/mpc8379_mds.dts        |   13 +++----
 arch/powerpc/boot/dts/mpc8379_rdb.dts        |   14 +++----
 arch/powerpc/boot/dts/mpc8541cds.dts         |   11 ++++++
 arch/powerpc/boot/dts/mpc8544ds.dts          |   11 ++++++
 arch/powerpc/boot/dts/mpc8548cds.dts         |   11 ++++++
 arch/powerpc/boot/dts/mpc8555cds.dts         |   11 ++++++
 arch/powerpc/boot/dts/mpc8568mds.dts         |   14 +++----
 arch/powerpc/boot/dts/mpc8572ds.dts          |   12 ++++++
 arch/powerpc/boot/dts/sbc8349.dts            |   14 +++-----
 arch/powerpc/boot/dts/sbc8548.dts            |   11 ++++++
 arch/powerpc/boot/dts/tqm8541.dts            |   11 ++++++
 arch/powerpc/boot/dts/tqm8555.dts            |   11 ++++++
 26 files changed, 213 insertions(+), 169 deletions(-)
Documentation/powerpc/booting-without-of.txt +25 -26
index c67d2f5..b52d104 100644
@@ -1474,9 +1474,8 @@ platforms are moved over to use the flattened-device-tree model.
 
    Required properties:
 
-    - device_type : Should be "crypto"
-    - model : Model of the device.  Should be "SEC1" or "SEC2"
-    - compatible : Should be "talitos"
+    - compatible : Should contain entries for all compatible SEC versions,
+      high to low, e.g., "fsl,sec2.1", "fsl,sec2.0"
     - reg : Offset and length of the register set for the device
     - interrupts : <a b> where a is the interrupt number and b is a
       field that represents an encoding of the sense and level
@@ -1485,27 +1484,29 @@ platforms are moved over to use the flattened-device-tree model.
       controller you have.
     - interrupt-parent : the phandle for the interrupt controller that
       services interrupts for this device.
-    - num-channels : An integer representing the number of channels
+    - fsl,num-channels : An integer representing the number of channels
       available.
-    - channel-fifo-len : An integer representing the number of
+    - fsl,channel-fifo-len : An integer representing the number of
       descriptor pointers each channel fetch fifo can hold.
-    - exec-units-mask : The bitmask representing what execution units
+    - fsl,exec-units-mask : The bitmask representing what execution units
       (EUs) are available. It's a single 32-bit cell. EU information
       should be encoded following the SEC's Descriptor Header Dword
       EU_SEL0 field documentation, i.e. as follows:
 
-        bit 0 = reserved - should be 0
-        bit 1 = set if SEC has the ARC4 EU (AFEU)
-        bit 2 = set if SEC has the DES/3DES EU (DEU)
-        bit 3 = set if SEC has the message digest EU (MDEU)
-        bit 4 = set if SEC has the random number generator EU (RNG)
-        bit 5 = set if SEC has the public key EU (PKEU)
-        bit 6 = set if SEC has the AES EU (AESU)
-        bit 7 = set if SEC has the Kasumi EU (KEU)
+        bit 0  = reserved - should be 0
+        bit 1  = set if SEC has the ARC4 EU (AFEU)
+        bit 2  = set if SEC has the DES/3DES EU (DEU)
+        bit 3  = set if SEC has the message digest EU (MDEU/MDEU-A)
+        bit 4  = set if SEC has the random number generator EU (RNG)
+        bit 5  = set if SEC has the public key EU (PKEU)
+        bit 6  = set if SEC has the AES EU (AESU)
+        bit 7  = set if SEC has the Kasumi EU (KEU)
+        bit 8  = set if SEC has the CRC EU (CRCU)
+        bit 11 = set if SEC has the message digest EU extended alg set (MDEU-B)
 
-      bits 8 through 31 are reserved for future SEC EUs.
+      remaining bits are reserved for future SEC EUs.
 
-    - descriptor-types-mask : The bitmask representing what descriptors
+    - fsl,descriptor-types-mask : The bitmask representing what descriptors
       are available. It's a single 32-bit cell. Descriptor type
       information should be encoded following the SEC's Descriptor
       Header Dword DESC_TYPE field documentation, i.e. as follows:
@@ -1529,16 +1530,14 @@ platforms are moved over to use the flattened-device-tree model.
 
        /* MPC8548E */
        crypto@30000 {
-               device_type = "crypto";
-               model = "SEC2";
-               compatible = "talitos";
-               reg = <30000 10000>;
-               interrupts = <1d 3>;
-               interrupt-parent = <40000>;
-               num-channels = <4>;
-               channel-fifo-len = <18>;
-               exec-units-mask = <000000fe>;
-               descriptor-types-mask = <012b0ebf>;
+               compatible = "fsl,sec2.1", "fsl,sec2.0";
+               reg = <0x30000 0x10000>;
+               interrupts = <29 2>;
+               interrupt-parent = <&mpic>;
+               fsl,num-channels = <4>;
+               fsl,channel-fifo-len = <24>;
+               fsl,exec-units-mask = <0xfe>;
+               fsl,descriptor-types-mask = <0x12b0ebf>;
        };
 
    h) Board Control and Status (BCSR)
arch/powerpc/boot/dts/mpc8272ads.dts +7 -14
index 46e2da3..9a3881d 100644
@@ -226,22 +226,15 @@
 			compatible = "fsl,mpc8272-pic", "fsl,cpm2-pic";
 		};
 
-/* May need to remove if on a part without crypto engine */
 		crypto@30000 {
-			device_type = "crypto";
-			model = "SEC2";
-			compatible = "fsl,mpc8272-talitos-sec2",
-			             "fsl,talitos-sec2",
-			             "fsl,talitos",
-			             "talitos";
-			reg = <0x30000 0x10000>;
-			interrupts = <11 8>;
+			compatible = "fsl,sec1.0";
+			reg = <0x40000 0x13000>;
+			interrupts = <47 0x8>;
 			interrupt-parent = <&PIC>;
-			num-channels = <4>;
-			channel-fifo-len = <24>;
-			exec-units-mask = <0x7e>;
-/* desc mask is for rev1.x, we need runtime fixup for >=2.x */
-			descriptor-types-mask = <0x1010ebf>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x7e>;
+			fsl,descriptor-types-mask = <0x1010415>;
 		};
 	};
 
arch/powerpc/boot/dts/mpc8313erdb.dts +6 -9
index e1f0dca..03edb86 100644
@@ -219,17 +219,14 @@
 		};
 
 		crypto@30000 {
-			device_type = "crypto";
-			model = "SEC2";
-			compatible = "talitos";
-			reg = <0x30000 0x7000>;
+			compatible = "fsl,sec2.2", "fsl,sec2.1", "fsl,sec2.0";
+			reg = <0x30000 0x10000>;
 			interrupts = <11 0x8>;
 			interrupt-parent = <&ipic>;
-			/* Rev. 2.2 */
-			num-channels = <1>;
-			channel-fifo-len = <24>;
-			exec-units-mask = <0x0000004c>;
-			descriptor-types-mask = <0x0122003f>;
+			fsl,num-channels = <1>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x4c>;
+			fsl,descriptor-types-mask = <0x0122003f>;
 		};
 
 		/* IPIC
arch/powerpc/boot/dts/mpc8315erdb.dts +7 -8
index d7a1ece..e433303 100644
@@ -206,17 +206,16 @@
 		};
 
 		crypto@30000 {
-			model = "SEC3";
-			device_type = "crypto";
-			compatible = "talitos";
+			compatible = "fsl,sec3.3", "fsl,sec3.1", "fsl,sec3.0",
+				     "fsl,sec2.4", "fsl,sec2.2", "fsl,sec2.1",
+				     "fsl,sec2.0";
 			reg = <0x30000 0x10000>;
 			interrupts = <11 0x8>;
 			interrupt-parent = <&ipic>;
-			/* Rev. 3.0 geometry */
-			num-channels = <4>;
-			channel-fifo-len = <24>;
-			exec-units-mask = <0x000001fe>;
-			descriptor-types-mask = <0x03ab0ebf>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x97c>;
+			fsl,descriptor-types-mask = <0x3ab0abf>;
 		};
 
 		sata@18000 {
arch/powerpc/boot/dts/mpc832x_mds.dts +6 -9
index 539e02f..5462845 100644
@@ -115,17 +115,14 @@
 		};
 
 		crypto@30000 {
-			device_type = "crypto";
-			model = "SEC2";
-			compatible = "talitos";
-			reg = <0x30000 0x7000>;
+			compatible = "fsl,sec2.2", "fsl,sec2.1", "fsl,sec2.0";
+			reg = <0x30000 0x10000>;
 			interrupts = <11 0x8>;
 			interrupt-parent = <&ipic>;
-			/* Rev. 2.2 */
-			num-channels = <1>;
-			channel-fifo-len = <24>;
-			exec-units-mask = <0x0000004c>;
-			descriptor-types-mask = <0x0122003f>;
+			fsl,num-channels = <1>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x4c>;
+			fsl,descriptor-types-mask = <0x0122003f>;
 		};
 
 		ipic: pic@700 {
arch/powerpc/boot/dts/mpc832x_rdb.dts +6 -9
index 179c81c..7fb50ab 100644
@@ -93,17 +93,14 @@
 		};
 
 		crypto@30000 {
-			device_type = "crypto";
-			model = "SEC2";
-			compatible = "talitos";
-			reg = <0x30000 0x7000>;
+			compatible = "fsl,sec2.2", "fsl,sec2.1", "fsl,sec2.0";
+			reg = <0x30000 0x10000>;
 			interrupts = <11 0x8>;
 			interrupt-parent = <&pic>;
-			/* Rev. 2.2 */
-			num-channels = <1>;
-			channel-fifo-len = <24>;
-			exec-units-mask = <0x0000004c>;
-			descriptor-types-mask = <0x0122003f>;
+			fsl,num-channels = <1>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x4c>;
+			fsl,descriptor-types-mask = <0x0122003f>;
 		};
 
 		pic:pic@700 {
arch/powerpc/boot/dts/mpc8349emitx.dts +5 -7
index 9426676..f7a850c 100644
@@ -178,16 +178,14 @@
 		};
 
 		crypto@30000 {
-			device_type = "crypto";
-			model = "SEC2";
-			compatible = "talitos";
+			compatible = "fsl,sec2.0";
 			reg = <0x30000 0x10000>;
 			interrupts = <11 0x8>;
 			interrupt-parent = <&ipic>;
-			num-channels = <4>;
-			channel-fifo-len = <24>;
-			exec-units-mask = <0x0000007e>;
-			descriptor-types-mask = <0x01010ebf>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x7e>;
+			fsl,descriptor-types-mask = <0x01010ebf>;
 		};
 
 		ipic: pic@700 {
arch/powerpc/boot/dts/mpc8349emitxgp.dts +5 -7
index f81d735..b866b47 100644
@@ -151,16 +151,14 @@
 		};
 
 		crypto@30000 {
-			device_type = "crypto";
-			model = "SEC2";
-			compatible = "talitos";
+			compatible = "fsl,sec2.0";
 			reg = <0x30000 0x10000>;
 			interrupts = <11 0x8>;
 			interrupt-parent = <&ipic>;
-			num-channels = <4>;
-			channel-fifo-len = <24>;
-			exec-units-mask = <0x0000007e>;
-			descriptor-types-mask = <0x01010ebf>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x7e>;
+			fsl,descriptor-types-mask = <0x01010ebf>;
 		};
 
 		ipic: pic@700 {
arch/powerpc/boot/dts/mpc834x_mds.dts +5 -10
index 0199c5c..e0d0753 100644
@@ -193,20 +193,15 @@
 			interrupt-parent = <&ipic>;
 		};
 
-		/* May need to remove if on a part without crypto engine */
 		crypto@30000 {
-			device_type = "crypto";
-			model = "SEC2";
-			compatible = "talitos";
+			compatible = "fsl,sec2.0";
 			reg = <0x30000 0x10000>;
 			interrupts = <11 0x8>;
 			interrupt-parent = <&ipic>;
-			num-channels = <4>;
-			channel-fifo-len = <24>;
-			exec-units-mask = <0x0000007e>;
-			/* desc mask is for rev2.0,
-			 * we need runtime fixup for >2.0 */
-			descriptor-types-mask = <0x01010ebf>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x7e>;
+			fsl,descriptor-types-mask = <0x01010ebf>;
 		};
 
 		/* IPIC
arch/powerpc/boot/dts/mpc836x_mds.dts +5 -8
index 8160ff2..69e6564 100644
@@ -119,17 +119,14 @@
 		};
 
 		crypto@30000 {
-			device_type = "crypto";
-			model = "SEC2";
-			compatible = "talitos";
+			compatible = "fsl,sec2.0";
 			reg = <0x30000 0x10000>;
 			interrupts = <11 0x8>;
 			interrupt-parent = <&ipic>;
-			num-channels = <4>;
-			channel-fifo-len = <24>;
-			exec-units-mask = <0x0000007e>;
-			/* desc mask is for rev1.x, we need runtime fixup for >=2.x */
-			descriptor-types-mask = <0x01010ebf>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x7e>;
+			fsl,descriptor-types-mask = <0x01010ebf>;
 		};
 
 		ipic: pic@700 {
arch/powerpc/boot/dts/mpc8377_mds.dts +6 -7
index fea5925..76149b7 100644
@@ -234,16 +234,15 @@
 		};
 
 		crypto@30000 {
-			model = "SEC3";
-			compatible = "talitos";
+			compatible = "fsl,sec3.0", "fsl,sec2.4", "fsl,sec2.2",
+				     "fsl,sec2.1", "fsl,sec2.0";
 			reg = <0x30000 0x10000>;
 			interrupts = <11 0x8>;
 			interrupt-parent = <&ipic>;
-			/* Rev. 3.0 geometry */
-			num-channels = <4>;
-			channel-fifo-len = <24>;
-			exec-units-mask = <0x000001fe>;
-			descriptor-types-mask = <0x03ab0ebf>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x9fe>;
+			fsl,descriptor-types-mask = <0x3ab0ebf>;
 		};
 
 		sdhc@2e000 {
arch/powerpc/boot/dts/mpc8377_rdb.dts +6 -8
index 5bc09ad..58d2472 100644
@@ -219,17 +219,15 @@
 		};
 
 		crypto@30000 {
-			model = "SEC3";
-			device_type = "crypto";
-			compatible = "talitos";
+			compatible = "fsl,sec3.0", "fsl,sec2.4", "fsl,sec2.2",
+				     "fsl,sec2.1", "fsl,sec2.0";
 			reg = <0x30000 0x10000>;
 			interrupts = <11 0x8>;
 			interrupt-parent = <&ipic>;
-			/* Rev. 3.0 geometry */
-			num-channels = <4>;
-			channel-fifo-len = <24>;
-			exec-units-mask = <0x000001fe>;
-			descriptor-types-mask = <0x03ab0ebf>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x9fe>;
+			fsl,descriptor-types-mask = <0x3ab0ebf>;
 		};
 
 		sata@18000 {
arch/powerpc/boot/dts/mpc8378_mds.dts +6 -7
index 1d6ea08..07a69a6 100644
@@ -234,16 +234,15 @@
 		};
 
 		crypto@30000 {
-			model = "SEC3";
-			compatible = "talitos";
+			compatible = "fsl,sec3.0", "fsl,sec2.4", "fsl,sec2.2",
+				     "fsl,sec2.1", "fsl,sec2.0";
 			reg = <0x30000 0x10000>;
 			interrupts = <11 0x8>;
 			interrupt-parent = <&ipic>;
-			/* Rev. 3.0 geometry */
-			num-channels = <4>;
-			channel-fifo-len = <24>;
-			exec-units-mask = <0x000001fe>;
-			descriptor-types-mask = <0x03ab0ebf>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x9fe>;
+			fsl,descriptor-types-mask = <0x3ab0ebf>;
 		};
 
 		sdhc@2e000 {
arch/powerpc/boot/dts/mpc8378_rdb.dts +6 -8
index 711f9a3..6f845d3 100644
@@ -219,17 +219,15 @@
 		};
 
 		crypto@30000 {
-			model = "SEC3";
-			device_type = "crypto";
-			compatible = "talitos";
+			compatible = "fsl,sec3.0", "fsl,sec2.4", "fsl,sec2.2",
+				     "fsl,sec2.1", "fsl,sec2.0";
 			reg = <0x30000 0x10000>;
 			interrupts = <11 0x8>;
 			interrupt-parent = <&ipic>;
-			/* Rev. 3.0 geometry */
-			num-channels = <4>;
-			channel-fifo-len = <24>;
-			exec-units-mask = <0x000001fe>;
-			descriptor-types-mask = <0x03ab0ebf>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x9fe>;
+			fsl,descriptor-types-mask = <0x3ab0ebf>;
 		};
 
 		/* IPIC
arch/powerpc/boot/dts/mpc8379_mds.dts +6 -7
index 6f78a9f..4d3bab0 100644
@@ -234,16 +234,15 @@
 		};
 
 		crypto@30000 {
-			model = "SEC3";
-			compatible = "talitos";
+			compatible = "fsl,sec3.0", "fsl,sec2.4", "fsl,sec2.2",
+				     "fsl,sec2.1", "fsl,sec2.0";
 			reg = <0x30000 0x10000>;
 			interrupts = <11 0x8>;
 			interrupt-parent = <&ipic>;
-			/* Rev. 3.0 geometry */
-			num-channels = <4>;
-			channel-fifo-len = <24>;
-			exec-units-mask = <0x000001fe>;
-			descriptor-types-mask = <0x03ab0ebf>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x9fe>;
+			fsl,descriptor-types-mask = <0x3ab0ebf>;
 		};
 
 		sdhc@2e000 {
arch/powerpc/boot/dts/mpc8379_rdb.dts +6 -8
index c11ceb7..71619c4 100644
@@ -219,17 +219,15 @@
 		};
 
 		crypto@30000 {
-			model = "SEC3";
-			device_type = "crypto";
-			compatible = "talitos";
+			compatible = "fsl,sec3.0", "fsl,sec2.4", "fsl,sec2.2",
+				     "fsl,sec2.1", "fsl,sec2.0";
 			reg = <0x30000 0x10000>;
 			interrupts = <11 0x8>;
 			interrupt-parent = <&ipic>;
-			/* Rev. 3.0 geometry */
-			num-channels = <4>;
-			channel-fifo-len = <24>;
-			exec-units-mask = <0x000001fe>;
-			descriptor-types-mask = <0x03ab0ebf>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x9fe>;
+			fsl,descriptor-types-mask = <0x3ab0ebf>;
 		};
 
 		sata@18000 {
arch/powerpc/boot/dts/mpc8541cds.dts +11 -0
index 663c7c5..14e9927 100644
@@ -147,6 +147,17 @@
 			interrupt-parent = <&mpic>;
 		};
 
+		crypto@30000 {
+			compatible = "fsl,sec2.0";
+			reg = <0x30000 0x10000>;
+			interrupts = <45 2>;
+			interrupt-parent = <&mpic>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x7e>;
+			fsl,descriptor-types-mask = <0x01010ebf>;
+		};
+
 		mpic: pic@40000 {
 			clock-frequency = <0>;
 			interrupt-controller;
arch/powerpc/boot/dts/mpc8544ds.dts +11 -0
index 1cfd970..f7a2a2e 100644
@@ -209,6 +209,17 @@
 			fsl,has-rstcr;
 		};
 
+		crypto@30000 {
+			compatible = "fsl,sec2.1", "fsl,sec2.0";
+			reg = <0x30000 0x10000>;
+			interrupts = <45 2>;
+			interrupt-parent = <&mpic>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0xfe>;
+			fsl,descriptor-types-mask = <0x12b0ebf>;
+		};
+
 		mpic: pic@40000 {
 			clock-frequency = <0>;
 			interrupt-controller;
arch/powerpc/boot/dts/mpc8548cds.dts +11 -0
index fa298a8..8410588 100644
@@ -207,6 +207,17 @@
 			fsl,has-rstcr;
 		};
 
+		crypto@30000 {
+			compatible = "fsl,sec2.1", "fsl,sec2.0";
+			reg = <0x30000 0x10000>;
+			interrupts = <45 2>;
+			interrupt-parent = <&mpic>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0xfe>;
+			fsl,descriptor-types-mask = <0x12b0ebf>;
+		};
+
 		mpic: pic@40000 {
 			clock-frequency = <0>;
 			interrupt-controller;
arch/powerpc/boot/dts/mpc8555cds.dts +11 -0
index b025c56..39e6730 100644
@@ -147,6 +147,17 @@
 			interrupt-parent = <&mpic>;
 		};
 
+		crypto@30000 {
+			compatible = "fsl,sec2.0";
+			reg = <0x30000 0x10000>;
+			interrupts = <45 2>;
+			interrupt-parent = <&mpic>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x7e>;
+			fsl,descriptor-types-mask = <0x01010ebf>;
+		};
+
 		mpic: pic@40000 {
 			clock-frequency = <0>;
 			interrupt-controller;
arch/powerpc/boot/dts/mpc8568mds.dts +6 -8
index a025a8e..7e4e5c5 100644
@@ -189,16 +189,14 @@
 		};
 
 		crypto@30000 {
-			device_type = "crypto";
-			model = "SEC2";
-			compatible = "talitos";
-			reg = <0x30000 0xf000>;
+			compatible = "fsl,sec2.1", "fsl,sec2.0";
+			reg = <0x30000 0x10000>;
 			interrupts = <45 2>;
 			interrupt-parent = <&mpic>;
-			num-channels = <4>;
-			channel-fifo-len = <24>;
-			exec-units-mask = <0xfe>;
-			descriptor-types-mask = <0x12b0ebf>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0xfe>;
+			fsl,descriptor-types-mask = <0x12b0ebf>;
 		};
 
 		mpic: pic@40000 {
arch/powerpc/boot/dts/mpc8572ds.dts +12 -0
index 174d51a..5320215 100644
@@ -237,6 +237,18 @@
 			interrupt-parent = <&mpic>;
 		};
 
+		crypto@30000 {
+			compatible = "fsl,sec3.0", "fsl,sec2.4", "fsl,sec2.2",
+				     "fsl,sec2.1", "fsl,sec2.0";
+			reg = <0x30000 0x10000>;
+			interrupts = <45 2 58 2>;
+			interrupt-parent = <&mpic>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x9fe>;
+			fsl,descriptor-types-mask = <0x3ab0ebf>;
+		};
+
 		mpic: pic@40000 {
 			clock-frequency = <0>;
 			interrupt-controller;
arch/powerpc/boot/dts/sbc8349.dts +5 -9
index 3839d4b..6013ed8 100644
@@ -186,19 +186,15 @@
 			interrupt-parent = <&ipic>;
 		};
 
-		/* May need to remove if on a part without crypto engine */
 		crypto@30000 {
-			model = "SEC2";
-			compatible = "talitos";
+			compatible = "fsl,sec2.0";
 			reg = <0x30000 0x10000>;
 			interrupts = <11 0x8>;
 			interrupt-parent = <&ipic>;
-			num-channels = <4>;
-			channel-fifo-len = <24>;
-			exec-units-mask = <0x0000007e>;
-			/* desc mask is for rev2.0,
-			 * we need runtime fixup for >2.0 */
-			descriptor-types-mask = <0x01010ebf>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x7e>;
+			fsl,descriptor-types-mask = <0x01010ebf>;
 		};
 
 		/* IPIC
arch/powerpc/boot/dts/sbc8548.dts +11 -0
index 22d9671..f358bac 100644
@@ -262,6 +262,17 @@
 			fsl,has-rstcr;
 		};
 
+		crypto@30000 {
+			compatible = "fsl,sec2.1", "fsl,sec2.0";
+			reg = <0x30000 0x10000>;
+			interrupts = <45 2>;
+			interrupt-parent = <&mpic>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0xfe>;
+			fsl,descriptor-types-mask = <0x12b0ebf>;
+		};
+
 		mpic: pic@40000 {
 			interrupt-controller;
 			#address-cells = <0>;
arch/powerpc/boot/dts/tqm8541.dts +11 -0
index 9e01093..ea3ea92 100644
@@ -158,6 +158,17 @@
 			interrupt-parent = <&mpic>;
 		};
 
+		crypto@30000 {
+			compatible = "fsl,sec2.0";
+			reg = <0x30000 0x10000>;
+			interrupts = <45 2>;
+			interrupt-parent = <&mpic>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x7e>;
+			fsl,descriptor-types-mask = <0x01010ebf>;
+		};
+
 		mpic: pic@40000 {
 			interrupt-controller;
 			#address-cells = <0>;
arch/powerpc/boot/dts/tqm8555.dts +11 -0
index a20eb06..e464684 100644
@@ -158,6 +158,17 @@
 			interrupt-parent = <&mpic>;
 		};
 
+		crypto@30000 {
+			compatible = "fsl,sec2.0";
+			reg = <0x30000 0x10000>;
+			interrupts = <45 2>;
+			interrupt-parent = <&mpic>;
+			fsl,num-channels = <4>;
+			fsl,channel-fifo-len = <24>;
+			fsl,exec-units-mask = <0x7e>;
+			fsl,descriptor-types-mask = <0x01010ebf>;
+		};
+
 		mpic: pic@40000 {
 			interrupt-controller;
 			#address-cells = <0>;
Signature · 1 line
1.5.5.1.125.gc697a
#1 lore raw
Quoted 4 lines · Kim Phillips

delete obsolete device-type property, delete model property (use compatible property instead), prepend "fsl," to Freescale specific properties. Add nodes to device trees that are missing them, and fix broken property values in other trees.

Hurrah, that broken binding has finally been fixed.

Quoted 1 line
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
#2 lore raw
In reply to Kim Phillips

Nice cleanup! Just one thing...

Quoted 3 lines

+ - compatible : Should contain entries for all compatible SEC
versions,
+ high to low, e.g., "fsl,sec2.1", "fsl,sec2.0"

*All* compatible versions? That's not really correct -- for example that would include *future* versions!

The first entry should describe the exact device version. If there are more entries, they should be for device versions where the driver for that device version can be reasonably expected to do something useful with this newer device (reduced functionality, perhaps). Listing *all* compatible devices is a) infeasible,
b) not useful, and c) insane :-)

Say you have a 3.3 device, and all 3.x devices have the same programming interface; also, the 2.x interface works with reduced functionality, and 1.x isn't useful at all; in that case, you would list 3.3, 3.0, 2.0. The driver that knows about 3.x would probe for 3.0, while an older driver would probe for 2.0. The driver doesn't need to probe for 3.3, since devices implementing 3.3 should show they are compatible with 3.0 (and the binding should say they should show this).

Also, the binding should explicitly list all defined compatible entries (and what they mean), not just give a few examples.

Segher

#3 lore raw
Quoted 8 lines · On Fri, 30 May 2008 23:28:38 +0200 Segher Boessenkool…

Nice cleanup! Just one thing...

Quoted 3 lines

+ - compatible : Should contain entries for all compatible SEC
versions,
+ high to low, e.g., "fsl,sec2.1", "fsl,sec2.0"

*All* compatible versions? That's not really correct -- for example that would include *future* versions!

ok, so 'backward compatible'..

Quoted 7 lines

The first entry should describe the exact device version. If there are more entries, they should be for device versions where the driver for that device version can be reasonably expected to do something useful with this newer device (reduced functionality, perhaps). Listing *all* compatible devices is a) infeasible,
b) not useful, and c) insane :-)

Quoted 9 lines

Say you have a 3.3 device, and all 3.x devices have the same programming interface; also, the 2.x interface works with reduced functionality, and 1.x isn't useful at all; in that case, you would list 3.3, 3.0, 2.0. The driver that knows about 3.x would probe for 3.0, while an older driver would probe for 2.0. The driver doesn't need to probe for 3.3, since devices implementing 3.3 should show they are compatible with 3.0 (and the binding should say they should show this).

All the driver has to do to turn on a particular feature is call of_device_is_compatible with the version string of the h/w version that introduces that feature. In the above case, a driver wanting to use e.g., hardware ICV checking, would have to check for 2.1 and 3.x instead of just 2.1.

Quoted 3 lines

Also, the binding should explicitly list all defined compatible entries (and what they mean), not just give a few examples.

I'm not sure I understand; a lot of the differences between the SEC versions are miniscule feature bits scattered across the programming model.

Kim