qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH 2/4] hw/arm/mps2-tz.c: Add extra data parameter to MakeDevFn
Date: Sat, 4 Sep 2021 10:52:56 +0200	[thread overview]
Message-ID: <2d19b6d1-b6ca-191c-0c9c-a5b1cf95c75b@linaro.org> (raw)
In-Reply-To: <20210903151435.22379-3-peter.maydell@linaro.org>

On 9/3/21 5:14 PM, Peter Maydell wrote:
> The mps2-tz boards use a data-driven structure to create the devices
> that sit behind peripheral protection controllers.  Currently the
> functions which create these devices are passed an 'opaque' pointer
> which is always the address within the machine struct of the device
> to create, and some "all devices need this" information like irqs and
> addresses.
> 
> If a specific device needs more information than this, it is
> currently not possible to pass that through from the PPCInfo
> data structure. Add support for passing an extra data parameter,
> so that we can more flexibly handle the needs of specific
> device types. To provide some type-safety we make this extra
> parameter a pointer to a union (which initially has no members).
> 
> In particular, we would like to be able to indicate which of the
> i2c controllers are for on-board devices only and which are
> connected to the external 'shield' expansion port; a subsequent
> patch will use this mechanism for that purpose.
> 
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> ---
>   hw/arm/mps2-tz.c | 35 ++++++++++++++++++++++-------------
>   1 file changed, 22 insertions(+), 13 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


  reply	other threads:[~2021-09-04  8:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03 15:14 [PATCH 0/4] Support marking individual qbus buses as 'full' Peter Maydell
2021-09-03 15:14 ` [PATCH 1/4] qdev: Support marking individual " Peter Maydell
2021-09-04  8:48   ` Richard Henderson
2021-09-03 15:14 ` [PATCH 2/4] hw/arm/mps2-tz.c: Add extra data parameter to MakeDevFn Peter Maydell
2021-09-04  8:52   ` Richard Henderson [this message]
2021-09-03 15:14 ` [PATCH 3/4] hw/arm/mps2-tz.c: Mark internal-only I2C buses as 'full' Peter Maydell
2021-09-04  8:53   ` Richard Henderson
2021-09-03 15:14 ` [PATCH 4/4] hw/arm/mps2.c: " Peter Maydell
2021-09-04  8:54   ` Richard Henderson

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=2d19b6d1-b6ca-191c-0c9c-a5b1cf95c75b@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=armbru@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@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).