diff options
author | Alexander Graf <agraf@suse.de> | 2012-05-17 12:20:50 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2012-06-24 01:04:47 +0200 |
commit | 51b852b74c999f099338fba1b26bbbb4ab8a0bd4 (patch) | |
tree | a046fa4bba11d1c6431c7b58865d43201e74cce4 /hw/ppce500_mpc8544ds.c | |
parent | d50f71a5fda5515021a33e8e391decb5602f6328 (diff) |
PPC: e500: dt: create / node dynamically
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/ppce500_mpc8544ds.c')
-rw-r--r-- | hw/ppce500_mpc8544ds.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index 54e7ec7c20..28c7c8c93d 100644 --- a/hw/ppce500_mpc8544ds.c +++ b/hw/ppce500_mpc8544ds.c @@ -76,6 +76,8 @@ static int mpc8544_load_device_tree(CPUPPCState *env, uint32_t clock_freq = 400000000; uint32_t tb_freq = 400000000; int i; + char compatible[] = "MPC8544DS\0MPC85xxDS"; + char model[] = "MPC8544DS"; filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, BINARY_DEVICE_TREE_FILE); if (!filename) { @@ -88,6 +90,12 @@ static int mpc8544_load_device_tree(CPUPPCState *env, } /* Manipulate device tree in memory. */ + qemu_devtree_setprop_string(fdt, "/", "model", model); + qemu_devtree_setprop(fdt, "/", "compatible", compatible, + sizeof(compatible)); + qemu_devtree_setprop_cell(fdt, "/", "#address-cells", 1); + qemu_devtree_setprop_cell(fdt, "/", "#size-cells", 1); + qemu_devtree_add_subnode(fdt, "/memory"); qemu_devtree_setprop_string(fdt, "/memory", "device_type", "memory"); qemu_devtree_setprop(fdt, "/memory", "reg", mem_reg_property, |