[POWERPC] FSL: I2C device tree cleanups
authorKumar Gala <galak@kernel.crashing.org>
Wed, 12 Dec 2007 05:17:24 +0000 (23:17 -0600)
committerKumar Gala <galak@kernel.crashing.org>
Wed, 12 Dec 2007 05:17:24 +0000 (23:17 -0600)
* Removed device_type = "i2c"
* Added missing second I2C controller on MPC8548 CDS, MPC8544 DS
* Added #address-cells, #size-cells, and cell-index where missing

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
21 files changed:
arch/powerpc/boot/dts/kuroboxHD.dts
arch/powerpc/boot/dts/kuroboxHG.dts
arch/powerpc/boot/dts/lite5200.dts
arch/powerpc/boot/dts/lite5200b.dts
arch/powerpc/boot/dts/mpc8313erdb.dts
arch/powerpc/boot/dts/mpc832x_mds.dts
arch/powerpc/boot/dts/mpc832x_rdb.dts
arch/powerpc/boot/dts/mpc8349emitx.dts
arch/powerpc/boot/dts/mpc8349emitxgp.dts
arch/powerpc/boot/dts/mpc834x_mds.dts
arch/powerpc/boot/dts/mpc836x_mds.dts
arch/powerpc/boot/dts/mpc8540ads.dts
arch/powerpc/boot/dts/mpc8541cds.dts
arch/powerpc/boot/dts/mpc8544ds.dts
arch/powerpc/boot/dts/mpc8548cds.dts
arch/powerpc/boot/dts/mpc8555cds.dts
arch/powerpc/boot/dts/mpc8568mds.dts
arch/powerpc/boot/dts/mpc8572ds.dts
arch/powerpc/boot/dts/mpc8610_hpcd.dts
arch/powerpc/boot/dts/mpc8641_hpcn.dts
arch/powerpc/sysdev/fsl_soc.c

index ec71ab819fee8a21522a35fe24a96bfbb481626b..1c14dcde6838b97432cc302b2210ba64785478ce 100644 (file)
@@ -60,7 +60,7 @@ XXXX add flash parts, rtc, ??
                i2c@80003000 {
                        #address-cells = <1>;
                        #size-cells = <0>;
-                       device_type = "i2c";
+                       cell-index = <0>;
                        compatible = "fsl-i2c";
                        reg = <80003000 1000>;
                        interrupts = <5 2>;
index 32ecd23199285bed81435759dfc86e54b60386e1..1b973fa34605519d3f86d91970935875f369c65f 100644 (file)
@@ -60,7 +60,7 @@ XXXX add flash parts, rtc, ??
                i2c@80003000 {
                        #address-cells = <1>;
                        #size-cells = <0>;
-                       device_type = "i2c";
+                       cell-index = <0>;
                        compatible = "fsl-i2c";
                        reg = <80003000 1000>;
                        interrupts = <5 2>;
index 6731763f028248d2569987d7f4f0c3585d5ae2c9..23eeeb1fc61eccc350cf554eefea3a9ca67e8f2a 100644 (file)
                };
 
                i2c@3d00 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
                        compatible = "mpc5200-i2c","fsl-i2c";
                        cell-index = <0>;
                        reg = <3d00 40>;
                };
 
                i2c@3d40 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
                        compatible = "mpc5200-i2c","fsl-i2c";
                        cell-index = <1>;
                        reg = <3d40 40>;
index b540388c608c4ec9addf0a3d66c9664f6d2d5ac6..f94e073de9a79bed7ac615580f7bc6154fd61e67 100644 (file)
                };
 
                i2c@3d00 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
                        compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
                        cell-index = <0>;
                        reg = <3d00 40>;
                };
 
                i2c@3d40 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
                        compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
                        cell-index = <1>;
                        reg = <3d40 40>;
index 9e7eba973262405fa00ea6b3facdb7f72b71f0b2..d417f1bbff6ec8d2dd36ae19d11c89e32a4f0362 100644 (file)
@@ -52,7 +52,9 @@
                };
 
                i2c@3000 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       cell-index = <0>;
                        compatible = "fsl-i2c";
                        reg = <3000 100>;
                        interrupts = <e 8>;
@@ -61,7 +63,9 @@
                };
 
                i2c@3100 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       cell-index = <1>;
                        compatible = "fsl-i2c";
                        reg = <3100 100>;
                        interrupts = <f 8>;
index c64f3037a13b4a0fd33fc1faec3ab106bf13e8e2..f866e81f93687079c2068d1a0931d0803a7dfbd4 100644 (file)
@@ -59,7 +59,7 @@
                i2c@3000 {
                        #address-cells = <1>;
                        #size-cells = <0>;
-                       device_type = "i2c";
+                       cell-index = <0>;
                        compatible = "fsl-i2c";
                        reg = <3000 100>;
                        interrupts = <e 8>;
index 388c8a7012e138910626babe9675bbe26b05abb6..91849dd6422384c5e7ea44e76533bf9a34173752 100644 (file)
@@ -52,7 +52,9 @@
                };
 
                i2c@3000 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       cell-index = <0>;
                        compatible = "fsl-i2c";
                        reg = <3000 100>;
                        interrupts = <e 8>;
index 5072f6d0a46d3a9631591b85f920cb2ed4668e8e..c29e4f4a7ae5a735716d62a12eee89f52676095a 100644 (file)
@@ -51,7 +51,9 @@
                };
 
                i2c@3000 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       cell-index = <0>;
                        compatible = "fsl-i2c";
                        reg = <3000 100>;
                        interrupts = <e 8>;
@@ -60,7 +62,9 @@
                };
 
                i2c@3100 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       cell-index = <1>;
                        compatible = "fsl-i2c";
                        reg = <3100 100>;
                        interrupts = <f 8>;
index 074f7a2ab7e4ccd97d5d425afe6d009ff4f3f443..6e51d172e4f87b6c4cd911fa8b35dd233744674b 100644 (file)
@@ -51,7 +51,9 @@
                };
 
                i2c@3000 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       cell-index = <0>;
                        compatible = "fsl-i2c";
                        reg = <3000 100>;
                        interrupts = <e 8>;
@@ -60,7 +62,9 @@
                };
 
                i2c@3100 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       cell-index = <1>;
                        compatible = "fsl-i2c";
                        reg = <3100 100>;
                        interrupts = <f 8>;
index 49363f89cb712494e64db301eafb7ebbbbfac187..73311e82ab5d98e299bf228d9ca7c56a124968a7 100644 (file)
@@ -59,7 +59,7 @@
                i2c@3000 {
                        #address-cells = <1>;
                        #size-cells = <0>;
-                       device_type = "i2c";
+                       cell-index = <0>;
                        compatible = "fsl-i2c";
                        reg = <3000 100>;
                        interrupts = <e 8>;
@@ -75,7 +75,7 @@
                i2c@3100 {
                        #address-cells = <1>;
                        #size-cells = <0>;
-                       device_type = "i2c";
+                       cell-index = <1>;
                        compatible = "fsl-i2c";
                        reg = <3100 100>;
                        interrupts = <f 8>;
index 0b2d2b588daa0c907523bb258e8aa11ec628fb25..8b7d77887503bc826f539c2e20eda12ae5c8ec1d 100644 (file)
@@ -64,7 +64,7 @@
                i2c@3000 {
                        #address-cells = <1>;
                        #size-cells = <0>;
-                       device_type = "i2c";
+                       cell-index = <0>;
                        compatible = "fsl-i2c";
                        reg = <3000 100>;
                        interrupts = <e 8>;
@@ -80,7 +80,7 @@
                i2c@3100 {
                        #address-cells = <1>;
                        #size-cells = <0>;
-                       device_type = "i2c";
+                       cell-index = <1>;
                        compatible = "fsl-i2c";
                        reg = <3100 100>;
                        interrupts = <f 8>;
index 6442a717ec3bf7532477372b9fd74b5f8a92d167..435a2b6e55a1e1e81a7ed4f908fcf0eb0a287c35 100644 (file)
@@ -63,7 +63,9 @@
                };
 
                i2c@3000 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       cell-index = <0>;
                        compatible = "fsl-i2c";
                        reg = <3000 100>;
                        interrupts = <2b 2>;
index f3f4d79deb636f3442b58cd87f206e269e3b8e01..101c0b6095b0b15b6e046cd0bf14da4364482d09 100644 (file)
@@ -63,7 +63,9 @@
                };
 
                i2c@3000 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       cell-index = <0>;
                        compatible = "fsl-i2c";
                        reg = <3000 100>;
                        interrupts = <2b 2>;
index 6c608de1fc1b53e499bf972a9d6dd48dc2a613db..a81eccae17a84b5635ecebff6cb5930dfc2d269e 100644 (file)
@@ -64,7 +64,9 @@
                };
 
                i2c@3000 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       cell-index = <0>;
                        compatible = "fsl-i2c";
                        reg = <3000 100>;
                        interrupts = <2b 2>;
                        dfsrr;
                };
 
+               i2c@3100 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       cell-index = <1>;
+                       compatible = "fsl-i2c";
+                       reg = <3100 100>;
+                       interrupts = <2b 2>;
+                       interrupt-parent = <&mpic>;
+                       dfsrr;
+               };
+
                mdio@24520 {
                        #address-cells = <1>;
                        #size-cells = <0>;
index 69ca5025d9723cc143b2e0e711c4ba50d6f0304f..70358dc0e571af68529762888600476b2a7e6f77 100644 (file)
@@ -63,7 +63,9 @@
                };
 
                i2c@3000 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       cell-index = <0>;
                        compatible = "fsl-i2c";
                        reg = <3000 100>;
                        interrupts = <2b 2>;
                        dfsrr;
                };
 
+               i2c@3100 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       cell-index = <1>;
+                       compatible = "fsl-i2c";
+                       reg = <3100 100>;
+                       interrupts = <2b 2>;
+                       interrupt-parent = <&mpic>;
+                       dfsrr;
+               };
+
                mdio@24520 {
                        #address-cells = <1>;
                        #size-cells = <0>;
index 57029cca32b2de2d4aa0e17a5039d3ab63ae9032..1e8bf4663b06c7ba8e3e60ad16ba842e5503c962 100644 (file)
@@ -63,7 +63,9 @@
                };
 
                i2c@3000 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       cell-index = <0>;
                        compatible = "fsl-i2c";
                        reg = <3000 100>;
                        interrupts = <2b 2>;
index 54394372b12afb5db116318e63f688272166d137..d73e5f165ef8dcf3ad2649839a8812ba469352d3 100644 (file)
@@ -74,7 +74,7 @@
                i2c@3000 {
                        #address-cells = <1>;
                        #size-cells = <0>;
-                       device_type = "i2c";
+                       cell-index = <0>;
                        compatible = "fsl-i2c";
                        reg = <3000 100>;
                        interrupts = <2b 2>;
@@ -90,7 +90,7 @@
                i2c@3100 {
                        #address-cells = <1>;
                        #size-cells = <0>;
-                       device_type = "i2c";
+                       cell-index = <1>;
                        compatible = "fsl-i2c";
                        reg = <3100 100>;
                        interrupts = <2b 2>;
index 0eb44fb9647dbccf50177d452d0486af529b51ae..91d15e8de9b5d51666317fe711c9ac8d457f21fc 100644 (file)
@@ -69,7 +69,9 @@
                };
 
                i2c@3000 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       cell-index = <0>;
                        compatible = "fsl-i2c";
                        reg = <3000 100>;
                        interrupts = <2b 2>;
@@ -78,7 +80,9 @@
                };
 
                i2c@3100 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       cell-index = <1>;
                        compatible = "fsl-i2c";
                        reg = <3100 100>;
                        interrupts = <2b 2>;
index 966edf1161a63f811bbe9951250767d34f481c7e..e9c444ed922fedd2f6a4cdc23887574bdf548976 100644 (file)
                bus-frequency = <0>;
 
                i2c@3000 {
-                       device_type = "i2c";
-                       compatible = "fsl-i2c";
                        #address-cells = <1>;
                        #size-cells = <0>;
+                       cell-index = <0>;
+                       compatible = "fsl-i2c";
                        reg = <3000 100>;
                        interrupts = <2b 2>;
                        interrupt-parent = <&mpic>;
                };
 
                i2c@3100 {
-                       device_type = "i2c";
-                       compatible = "fsl-i2c";
                        #address-cells = <1>;
                        #size-cells = <0>;
+                       cell-index = <1>;
+                       compatible = "fsl-i2c";
                        reg = <3100 100>;
                        interrupts = <2b 2>;
                        interrupt-parent = <&mpic>;
index b039f2136c9b41b976319a3007bf214f5dc860c9..dc0efafd584f10f50989eccf7e431978689e387e 100644 (file)
@@ -69,7 +69,9 @@
                bus-frequency = <0>;
 
                i2c@3000 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       cell-index = <0>;
                        compatible = "fsl-i2c";
                        reg = <3000 100>;
                        interrupts = <2b 2>;
@@ -78,7 +80,9 @@
                };
 
                i2c@3100 {
-                       device_type = "i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       cell-index = <1>;
                        compatible = "fsl-i2c";
                        reg = <3100 100>;
                        interrupts = <2b 2>;
index 3ace7474809e00ba6d21be039e2d6dc21215b442..81af4bdf252aaa61054c433215b46a87377ab5b7 100644 (file)
@@ -390,13 +390,11 @@ static void __init of_register_i2c_devices(struct device_node *adap_node,
 static int __init fsl_i2c_of_init(void)
 {
        struct device_node *np;
-       unsigned int i;
+       unsigned int i = 0;
        struct platform_device *i2c_dev;
        int ret;
 
-       for (np = NULL, i = 0;
-            (np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL;
-            i++) {
+       for_each_compatible_node(np, NULL, "fsl-i2c") {
                struct resource r[2];
                struct fsl_i2c_platform_data i2c_data;
                const unsigned char *flags = NULL;
@@ -432,7 +430,7 @@ static int __init fsl_i2c_of_init(void)
                if (ret)
                        goto unreg;
 
-               of_register_i2c_devices(np, i);
+               of_register_i2c_devices(np, i++);
        }
 
        return 0;