aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2012-05-17 11:34:50 +0200
committerAlexander Graf <agraf@suse.de>2012-06-24 01:04:47 +0200
commitdd0bcfca64d12f557fae67a0ca318bf9b5579dd9 (patch)
tree01d651fdd9c40fb5d62f05a254232b72d7265af3
parent63397dd0be8d03d62393620e8192dafe0db72f8f (diff)
PPC: e500: dt: create memory node dynamically
Signed-off-by: Alexander Graf <agraf@suse.de>
-rw-r--r--hw/ppce500_mpc8544ds.c8
-rw-r--r--pc-bios/mpc8544ds.dtbbin2028 -> 1972 bytes
-rw-r--r--pc-bios/mpc8544ds.dts5
3 files changed, 4 insertions, 9 deletions
diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c
index 506ddf38b8..3ec90133fd 100644
--- a/hw/ppce500_mpc8544ds.c
+++ b/hw/ppce500_mpc8544ds.c
@@ -88,10 +88,10 @@ static int mpc8544_load_device_tree(CPUPPCState *env,
}
/* Manipulate device tree in memory. */
- ret = qemu_devtree_setprop(fdt, "/memory", "reg", mem_reg_property,
- sizeof(mem_reg_property));
- if (ret < 0)
- fprintf(stderr, "couldn't set /memory/reg\n");
+ qemu_devtree_add_subnode(fdt, "/memory");
+ qemu_devtree_setprop_string(fdt, "/memory", "device_type", "memory");
+ qemu_devtree_setprop(fdt, "/memory", "reg", mem_reg_property,
+ sizeof(mem_reg_property));
if (initrd_size) {
ret = qemu_devtree_setprop_cell(fdt, "/chosen", "linux,initrd-start",
diff --git a/pc-bios/mpc8544ds.dtb b/pc-bios/mpc8544ds.dtb
index c6d302153c..db9fb701f2 100644
--- a/pc-bios/mpc8544ds.dtb
+++ b/pc-bios/mpc8544ds.dtb
Binary files differ
diff --git a/pc-bios/mpc8544ds.dts b/pc-bios/mpc8544ds.dts
index 7eb31604fc..f46e9ede06 100644
--- a/pc-bios/mpc8544ds.dts
+++ b/pc-bios/mpc8544ds.dts
@@ -27,11 +27,6 @@
#size-cells = <0>;
};
- memory {
- device_type = "memory";
- reg = <0x0 0x0>; // Filled by U-Boot
- };
-
soc8544@e0000000 {
#address-cells = <1>;
#size-cells = <1>;