[PATCH 2/2] Add local bus device nodes to MPC837xMDS device trees.
Li Yang
leoli at freescale.com
Thu Mar 6 21:42:35 EST 2008
Signed-off-by: Li Yang <leoli at freescale.com>
---
arch/powerpc/boot/dts/mpc8377_mds.dts | 66 +++++++++++++++++++++++++++++
arch/powerpc/boot/dts/mpc8378_mds.dts | 66 +++++++++++++++++++++++++++++
arch/powerpc/boot/dts/mpc8379_mds.dts | 66 +++++++++++++++++++++++++++++
arch/powerpc/platforms/83xx/mpc837x_mds.c | 8 +--
4 files changed, 201 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/boot/dts/mpc8377_mds.dts b/arch/powerpc/boot/dts/mpc8377_mds.dts
index 677a061..3aac8b7 100644
--- a/arch/powerpc/boot/dts/mpc8377_mds.dts
+++ b/arch/powerpc/boot/dts/mpc8377_mds.dts
@@ -47,6 +47,72 @@
reg = <0x00000000 0x20000000>; // 512MB at 0
};
+ localbus at 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 at 0,0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "cfi-flash";
+ reg = <0 0x0 0x2000000>;
+ bank-width = <2>;
+ device-width = <1>;
+
+ u-boot at 0 {
+ reg = <0x0 0x100000>;
+ read-only;
+ };
+
+ fs at 100000 {
+ reg = <0x100000 0x800000>;
+ };
+
+ kernel at 1d00000 {
+ reg = <0x1d00000 0x200000>;
+ };
+
+ dtb at 1f00000 {
+ reg = <0x1f00000 0x100000>;
+ };
+ };
+
+ bcsr at 1,0 {
+ reg = <1 0x0 0x8000>;
+ compatible = "fsl,mpc837xmds-bcsr";
+ };
+
+ nand at 3,0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "fsl,mpc8377-fcm-nand",
+ "fsl,elbc-fcm-nand";
+ reg = <3 0x0 0x8000>;
+
+ u-boot at 0 {
+ reg = <0x0 0x100000>;
+ read-only;
+ };
+
+ kernel at 100000 {
+ reg = <0x100000 0x300000>;
+ };
+
+ fs at 400000 {
+ reg = <0x400000 0x1c00000>;
+ };
+ };
+ };
+
soc at e0000000 {
#address-cells = <1>;
#size-cells = <1>;
diff --git a/arch/powerpc/boot/dts/mpc8378_mds.dts b/arch/powerpc/boot/dts/mpc8378_mds.dts
index 3f9e9fe..2496e19 100644
--- a/arch/powerpc/boot/dts/mpc8378_mds.dts
+++ b/arch/powerpc/boot/dts/mpc8378_mds.dts
@@ -47,6 +47,72 @@
reg = <0x00000000 0x20000000>; // 512MB at 0
};
+ localbus at 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 at 0,0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "cfi-flash";
+ reg = <0 0x0 0x2000000>;
+ bank-width = <2>;
+ device-width = <1>;
+
+ u-boot at 0 {
+ reg = <0x0 0x100000>;
+ read-only;
+ };
+
+ fs at 100000 {
+ reg = <0x100000 0x800000>;
+ };
+
+ kernel at 1d00000 {
+ reg = <0x1d00000 0x200000>;
+ };
+
+ dtb at 1f00000 {
+ reg = <0x1f00000 0x100000>;
+ };
+ };
+
+ bcsr at 1,0 {
+ reg = <1 0x0 0x8000>;
+ compatible = "fsl,mpc837xmds-bcsr";
+ };
+
+ nand at 3,0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "fsl,mpc8378-fcm-nand",
+ "fsl,elbc-fcm-nand";
+ reg = <3 0x0 0x8000>;
+
+ u-boot at 0 {
+ reg = <0x0 0x100000>;
+ read-only;
+ };
+
+ kernel at 100000 {
+ reg = <0x100000 0x300000>;
+ };
+
+ fs at 400000 {
+ reg = <0x400000 0x1c00000>;
+ };
+ };
+ };
+
soc at e0000000 {
#address-cells = <1>;
#size-cells = <1>;
diff --git a/arch/powerpc/boot/dts/mpc8379_mds.dts b/arch/powerpc/boot/dts/mpc8379_mds.dts
index 36c1c13..5ae4644 100644
--- a/arch/powerpc/boot/dts/mpc8379_mds.dts
+++ b/arch/powerpc/boot/dts/mpc8379_mds.dts
@@ -47,6 +47,72 @@
reg = <0x00000000 0x20000000>; // 512MB at 0
};
+ localbus at 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 at 0,0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "cfi-flash";
+ reg = <0 0x0 0x2000000>;
+ bank-width = <2>;
+ device-width = <1>;
+
+ u-boot at 0 {
+ reg = <0x0 0x100000>;
+ read-only;
+ };
+
+ fs at 100000 {
+ reg = <0x100000 0x800000>;
+ };
+
+ kernel at 1d00000 {
+ reg = <0x1d00000 0x200000>;
+ };
+
+ dtb at 1f00000 {
+ reg = <0x1f00000 0x100000>;
+ };
+ };
+
+ bcsr at 1,0 {
+ reg = <1 0x0 0x8000>;
+ compatible = "fsl,mpc837xmds-bcsr";
+ };
+
+ nand at 3,0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "fsl,mpc8379-fcm-nand",
+ "fsl,elbc-fcm-nand";
+ reg = <3 0x0 0x8000>;
+
+ u-boot at 0 {
+ reg = <0x0 0x100000>;
+ read-only;
+ };
+
+ kernel at 100000 {
+ reg = <0x100000 0x300000>;
+ };
+
+ fs at 400000 {
+ reg = <0x400000 0x1c00000>;
+ };
+ };
+ };
+
soc at e0000000 {
#address-cells = <1>;
#size-cells = <1>;
diff --git a/arch/powerpc/platforms/83xx/mpc837x_mds.c b/arch/powerpc/platforms/83xx/mpc837x_mds.c
index 8a9c269..1f4b7e8 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_mds.c
@@ -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", },
{},
};
--
1.5.4.rc4
More information about the Linuxppc-dev
mailing list