From: Cédric Le Goater Date: Tue, 10 Dec 2019 13:58:44 +0000 (+0100) Subject: ppc/pnv: Loop on the whole hierarchy to populate the DT with the XSCOM nodes X-Git-Tag: v5.0.0-rc0~179^2~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=109dce37860aeb0e8894cb36b29d40f279c6bb6b;p=thirdparty%2Fqemu.git ppc/pnv: Loop on the whole hierarchy to populate the DT with the XSCOM nodes Some PnvXScomInterface objects lie a bit deeper (PnvPBCQState) than the first layer, so we need to loop on the whole object hierarchy to catch them. Signed-off-by: Cédric Le Goater Message-Id: <20191210135845.19773-2-clg@kaod.org> Reviewed-by: Greg Kurz [dwg: Corrected error in comment] Signed-off-by: David Gibson --- diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c index b3d3b6e3507..760571037bf 100644 --- a/hw/ppc/pnv_xscom.c +++ b/hw/ppc/pnv_xscom.c @@ -358,7 +358,12 @@ int pnv_dt_xscom(PnvChip *chip, void *fdt, int root_offset) args.fdt = fdt; args.xscom_offset = xscom_offset; - object_child_foreach(OBJECT(chip), xscom_dt_child, &args); + /* + * Loop on the whole object hierarchy to catch all + * PnvXScomInterface objects which can lie a bit deeper than the + * first layer. + */ + object_child_foreach_recursive(OBJECT(chip), xscom_dt_child, &args); return 0; }