[POWERPC] 83xx: Add local bus device nodes to MPC837xMDS device trees.
authorLi Yang <leoli@freescale.com>
Thu, 6 Mar 2008 10:42:35 +0000 (18:42 +0800)
committerKumar Gala <galak@kernel.crashing.org>
Fri, 7 Mar 2008 14:42:22 +0000 (08:42 -0600)
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/boot/dts/mpc8377_mds.dts
arch/powerpc/boot/dts/mpc8378_mds.dts
arch/powerpc/boot/dts/mpc8379_mds.dts
arch/powerpc/platforms/83xx/mpc837x_mds.c

index 677a061..49c05e9 100644 (file)
                reg = <0x00000000 0x20000000>;  // 512MB at 0
        };
 
+       localbus@e0005000 {
+               #address-cells = <2>;
+               #size-cells = <1>;
+               compatible = "fsl,mpc8377-elbc", "fsl,elbc", "simple-bus";
+               reg = <0xe0005000 0x1000>;
+               interrupts = <77 0x8>;
+               interrupt-parent = <&ipic>;
+
+               // booting from NOR flash
+               ranges = <0 0x0 0xfe000000 0x02000000
+                         1 0x0 0xf8000000 0x00008000
+                         3 0x0 0xe0600000 0x00008000>;
+
+               flash@0,0 {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "cfi-flash";
+                       reg = <0 0x0 0x2000000>;
+                       bank-width = <2>;
+                       device-width = <1>;
+
+                       u-boot@0 {
+                               reg = <0x0 0x100000>;
+                               read-only;
+                       };
+
+                       fs@100000 {
+                               reg = <0x100000 0x800000>;
+                       };
+
+                       kernel@1d00000 {
+                               reg = <0x1d00000 0x200000>;
+                       };
+
+                       dtb@1f00000 {
+                               reg = <0x1f00000 0x100000>;
+                       };
+               };
+
+               bcsr@1,0 {
+                       reg = <1 0x0 0x8000>;
+                       compatible = "fsl,mpc837xmds-bcsr";
+               };
+
+               nand@3,0 {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "fsl,mpc8377-fcm-nand",
+                                    "fsl,elbc-fcm-nand";
+                       reg = <3 0x0 0x8000>;
+
+                       u-boot@0 {
+                               reg = <0x0 0x100000>;
+                               read-only;
+                       };
+
+                       kernel@100000 {
+                               reg = <0x100000 0x300000>;
+                       };
+
+                       fs@400000 {
+                               reg = <0x400000 0x1c00000>;
+                       };
+               };
+       };
+
        soc@e0000000 {
                #address-cells = <1>;
                #size-cells = <1>;
index 3f9e9fe..1d6ea08 100644 (file)
                reg = <0x00000000 0x20000000>;  // 512MB at 0
        };
 
+       localbus@e0005000 {
+               #address-cells = <2>;
+               #size-cells = <1>;
+               compatible = "fsl,mpc8378-elbc", "fsl,elbc", "simple-bus";
+               reg = <0xe0005000 0x1000>;
+               interrupts = <77 0x8>;
+               interrupt-parent = <&ipic>;
+
+               // booting from NOR flash
+               ranges = <0 0x0 0xfe000000 0x02000000
+                         1 0x0 0xf8000000 0x00008000
+                         3 0x0 0xe0600000 0x00008000>;
+
+               flash@0,0 {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "cfi-flash";
+                       reg = <0 0x0 0x2000000>;
+                       bank-width = <2>;
+                       device-width = <1>;
+
+                       u-boot@0 {
+                               reg = <0x0 0x100000>;
+                               read-only;
+                       };
+
+                       fs@100000 {
+                               reg = <0x100000 0x800000>;
+                       };
+
+                       kernel@1d00000 {
+                               reg = <0x1d00000 0x200000>;
+                       };
+
+                       dtb@1f00000 {
+                               reg = <0x1f00000 0x100000>;
+                       };
+               };
+
+               bcsr@1,0 {
+                       reg = <1 0x0 0x8000>;
+                       compatible = "fsl,mpc837xmds-bcsr";
+               };
+
+               nand@3,0 {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "fsl,mpc8378-fcm-nand",
+                                    "fsl,elbc-fcm-nand";
+                       reg = <3 0x0 0x8000>;
+
+                       u-boot@0 {
+                               reg = <0x0 0x100000>;
+                               read-only;
+                       };
+
+                       kernel@100000 {
+                               reg = <0x100000 0x300000>;
+                       };
+
+                       fs@400000 {
+                               reg = <0x400000 0x1c00000>;
+                       };
+               };
+       };
+
        soc@e0000000 {
                #address-cells = <1>;
                #size-cells = <1>;
index 36c1c13..fdb4a92 100644 (file)
                reg = <0x00000000 0x20000000>;  // 512MB at 0
        };
 
+       localbus@e0005000 {
+               #address-cells = <2>;
+               #size-cells = <1>;
+               compatible = "fsl,mpc8379-elbc", "fsl,elbc", "simple-bus";
+               reg = <0xe0005000 0x1000>;
+               interrupts = <77 0x8>;
+               interrupt-parent = <&ipic>;
+
+               // booting from NOR flash
+               ranges = <0 0x0 0xfe000000 0x02000000
+                         1 0x0 0xf8000000 0x00008000
+                         3 0x0 0xe0600000 0x00008000>;
+
+               flash@0,0 {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "cfi-flash";
+                       reg = <0 0x0 0x2000000>;
+                       bank-width = <2>;
+                       device-width = <1>;
+
+                       u-boot@0 {
+                               reg = <0x0 0x100000>;
+                               read-only;
+                       };
+
+                       fs@100000 {
+                               reg = <0x100000 0x800000>;
+                       };
+
+                       kernel@1d00000 {
+                               reg = <0x1d00000 0x200000>;
+                       };
+
+                       dtb@1f00000 {
+                               reg = <0x1f00000 0x100000>;
+                       };
+               };
+
+               bcsr@1,0 {
+                       reg = <1 0x0 0x8000>;
+                       compatible = "fsl,mpc837xmds-bcsr";
+               };
+
+               nand@3,0 {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "fsl,mpc8379-fcm-nand",
+                                    "fsl,elbc-fcm-nand";
+                       reg = <3 0x0 0x8000>;
+
+                       u-boot@0 {
+                               reg = <0x0 0x100000>;
+                               read-only;
+                       };
+
+                       kernel@100000 {
+                               reg = <0x100000 0x300000>;
+                       };
+
+                       fs@400000 {
+                               reg = <0x400000 0x1c00000>;
+                       };
+               };
+       };
+
        soc@e0000000 {
                #address-cells = <1>;
                #size-cells = <1>;
index 8a9c269..64d17b0 100644 (file)
@@ -39,12 +39,9 @@ static int mpc837xmds_usb_cfg(void)
        if (ret)
                return ret;
        /* Map BCSR area */
-       np = of_find_node_by_name(NULL, "bcsr");
+       np = of_find_compatible_node(NULL, NULL, "fsl,mpc837xmds-bcsr");
        if (np) {
-               struct resource res;
-
-               of_address_to_resource(np, 0, &res);
-               bcsr_regs = ioremap(res.start, res.end - res.start + 1);
+               bcsr_regs = of_iomap(np, 0);
                of_node_put(np);
        }
        if (!bcsr_regs)
@@ -96,6 +93,7 @@ static void __init mpc837x_mds_setup_arch(void)
 static struct of_device_id mpc837x_ids[] = {
        { .type = "soc", },
        { .compatible = "soc", },
+       { .compatible = "simple-bus", },
        {},
 };