From: Greg Kurz <groug@kaod.org>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH 2/2] ppc/pnv: populate the DT with realized XSCOM devices
Date: Tue, 10 Dec 2019 17:53:23 +0100 [thread overview]
Message-ID: <20191210175323.76e77bcb@bahia.tlslab.ibm.com> (raw)
In-Reply-To: <20191210135845.19773-3-clg@kaod.org>
On Tue, 10 Dec 2019 14:58:45 +0100
Cédric Le Goater <clg@kaod.org> wrote:
> 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.
>
Do you have examples of such devices to share ?
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> ---
> hw/ppc/pnv_xscom.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c
> index 006d87e970d9..6d3745a49e50 100644
> --- a/hw/ppc/pnv_xscom.c
> +++ b/hw/ppc/pnv_xscom.c
> @@ -272,7 +272,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)));
> }
> }
next prev parent reply other threads:[~2019-12-10 17:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-10 13:58 [PATCH 0/2] ppc/pnv: minor XSCOM fixes Cédric Le Goater
2019-12-10 13:58 ` [PATCH 1/2] ppc/pnv: Loop on the whole hierarchy to populate the DT with the XSCOM nodes Cédric Le Goater
2019-12-10 16:49 ` Greg Kurz
2019-12-10 17:08 ` Cédric Le Goater
2019-12-10 18:04 ` Cédric Le Goater
2019-12-10 23:46 ` David Gibson
2019-12-10 21:24 ` Greg Kurz
2019-12-10 13:58 ` [PATCH 2/2] ppc/pnv: populate the DT with realized XSCOM devices Cédric Le Goater
2019-12-10 16:53 ` Greg Kurz [this message]
2019-12-10 17:08 ` Cédric Le Goater
2019-12-10 21:24 ` Greg Kurz
2019-12-10 23:46 ` [PATCH 0/2] ppc/pnv: minor XSCOM fixes David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191210175323.76e77bcb@bahia.tlslab.ibm.com \
--to=groug@kaod.org \
--cc=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).