mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
PPC: e500: dt: create global-utils node dynamically
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
19ac9deacb
commit
f5038483e4
2 changed files with 9 additions and 6 deletions
|
@ -85,6 +85,7 @@ static int mpc8544_load_device_tree(CPUPPCState *env,
|
||||||
char ser1[128];
|
char ser1[128];
|
||||||
char mpic[128];
|
char mpic[128];
|
||||||
uint32_t mpic_ph;
|
uint32_t mpic_ph;
|
||||||
|
char gutil[128];
|
||||||
|
|
||||||
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, BINARY_DEVICE_TREE_FILE);
|
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, BINARY_DEVICE_TREE_FILE);
|
||||||
if (!filename) {
|
if (!filename) {
|
||||||
|
@ -247,6 +248,14 @@ static int mpc8544_load_device_tree(CPUPPCState *env,
|
||||||
qemu_devtree_setprop_string(fdt, "/aliases", "serial0", ser0);
|
qemu_devtree_setprop_string(fdt, "/aliases", "serial0", ser0);
|
||||||
qemu_devtree_setprop_string(fdt, "/chosen", "linux,stdout-path", ser0);
|
qemu_devtree_setprop_string(fdt, "/chosen", "linux,stdout-path", ser0);
|
||||||
|
|
||||||
|
snprintf(gutil, sizeof(gutil), "%s/global-utilities@%x", soc,
|
||||||
|
MPC8544_UTIL_BASE - MPC8544_CCSRBAR_BASE);
|
||||||
|
qemu_devtree_add_subnode(fdt, gutil);
|
||||||
|
qemu_devtree_setprop_string(fdt, gutil, "compatible", "fsl,mpc8544-guts");
|
||||||
|
qemu_devtree_setprop_cells(fdt, gutil, "reg", MPC8544_UTIL_BASE -
|
||||||
|
MPC8544_CCSRBAR_BASE, 0x1000);
|
||||||
|
qemu_devtree_setprop(fdt, gutil, "fsl,has-rstcr", NULL, 0);
|
||||||
|
|
||||||
ret = rom_add_blob_fixed(BINARY_DEVICE_TREE_FILE, fdt, fdt_size, addr);
|
ret = rom_add_blob_fixed(BINARY_DEVICE_TREE_FILE, fdt, fdt_size, addr);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
@ -24,12 +24,6 @@
|
||||||
compatible = "chrp,open-pic";
|
compatible = "chrp,open-pic";
|
||||||
device_type = "open-pic";
|
device_type = "open-pic";
|
||||||
};
|
};
|
||||||
|
|
||||||
global-utilities@e0000 { //global utilities block
|
|
||||||
compatible = "fsl,mpc8544-guts";
|
|
||||||
reg = <0xe0000 0x1000>;
|
|
||||||
fsl,has-rstcr;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pci0: pci@e0008000 {
|
pci0: pci@e0008000 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue