[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] ppc/pnv: Loop on the whole hierarchy to populate the DT
From: |
Greg Kurz |
Subject: |
Re: [PATCH 1/2] ppc/pnv: Loop on the whole hierarchy to populate the DT with the XSCOM nodes |
Date: |
Tue, 10 Dec 2019 22:24:26 +0100 |
On Tue, 10 Dec 2019 14:58:44 +0100
Cédric Le Goater <address@hidden> wrote:
> 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 <address@hidden>
> ---
Reviewed-by: Greg Kurz <address@hidden>
> hw/ppc/pnv_xscom.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c
> index bed41840845e..006d87e970d9 100644
> --- a/hw/ppc/pnv_xscom.c
> +++ b/hw/ppc/pnv_xscom.c
> @@ -326,7 +326,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 the first
> + * layer.
> + */
> + object_child_foreach_recursive(OBJECT(chip), xscom_dt_child, &args);
> return 0;
> }
>