aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2019-12-10 14:58:45 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2019-12-17 10:39:48 +1100
commit9e028fffaabee37ea05baf1950376f401bbff91c (patch)
treee5df5e429353dfd5a4ba022134a5339954f36abc /hw
parent109dce37860aeb0e8894cb36b29d40f279c6bb6b (diff)
downloadqemu-9e028fffaabee37ea05baf1950376f401bbff91c.zip
qemu-9e028fffaabee37ea05baf1950376f401bbff91c.tar.gz
qemu-9e028fffaabee37ea05baf1950376f401bbff91c.tar.bz2
ppc/pnv: populate the DT with realized XSCOM devices
Some devices could be initialized in the instance_init handler but not realized for configuration reasons. Nodes should not be added in the DT for such devices. Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20191210135845.19773-3-clg@kaod.org> Reviewed-by: Greg Kurz <groug@kaod.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw')
-rw-r--r--hw/ppc/pnv_xscom.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c
index 7605710..fd48d4e 100644
--- a/hw/ppc/pnv_xscom.c
+++ b/hw/ppc/pnv_xscom.c
@@ -304,7 +304,10 @@ static int xscom_dt_child(Object *child, void *opaque)
PnvXScomInterface *xd = PNV_XSCOM_INTERFACE(child);
PnvXScomInterfaceClass *xc = PNV_XSCOM_INTERFACE_GET_CLASS(xd);
- if (xc->dt_xscom) {
+ /*
+ * Only "realized" devices should be configured in the DT
+ */
+ if (xc->dt_xscom && DEVICE(child)->realized) {
_FDT((xc->dt_xscom(xd, args->fdt, args->xscom_offset)));
}
}