From: Bernhard Beschow <shentey@gmail.com>
To: qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
qemu-ppc@nongnu.org, Bernhard Beschow <shentey@gmail.com>
Subject: [PATCH 0/3] Split TYPE_GPIOPWR and reuse in E500 machines
Date: Mon, 23 Sep 2024 12:15:51 +0200 [thread overview]
Message-ID: <20240923101554.12900-1-shentey@gmail.com> (raw)
This series is part of a bigger series exploring data-driven machine creation
using device tree blobs on top of the e500 machines [1]. The idea is to
instantiate a QEMU device model for each device tree node containing a
compatible property. [1] achieves feature-parity with the hardcoded machines
when supplied the same device tree blob that the hardcoded machine would
generate.
Just like the ARM virt machine, the ppce500 machine implements a
"gpio-poweroff"-compatible device tree node. Unfortunately, the implementation
isn't shared which this series fixes. In order to reflect device tree which has
separate bindings for gpio-poweroff and gpio-reset, and to prepare for the
above, the gpio-pwr device model is split.
Note: If the split seems too fine-grained, the existing gpio-pwr device model
could probably be reused in ppce500, too.
Testing done:
* Build qemu_ppc64_e5500_defconfig in Buildroot, run it in the ppce500 machine
and issue the `poweroff` command. Observe that QEMU is shut down cleanly.
* ARM virt: How to test the secure path?
[1] https://github.com/shentok/qemu/tree/e500-fdt
Bernhard Beschow (3):
MAINTAINERS: Add hw/gpio/gpio_pwr.c
hw/gpio/gpio_pwr: Split into separate gpio_poweroff and gpio_restart
devices
hw/ppc/e500: Reuse TYPE_GPIO_POWEROFF
MAINTAINERS | 2 ++
hw/arm/virt.c | 32 +++++++++++++------
hw/gpio/gpio_poweroff.c | 51 ++++++++++++++++++++++++++++++
hw/gpio/gpio_pwr.c | 70 -----------------------------------------
hw/gpio/gpio_restart.c | 51 ++++++++++++++++++++++++++++++
hw/ppc/e500.c | 15 ++-------
hw/arm/Kconfig | 3 +-
hw/gpio/Kconfig | 5 ++-
hw/gpio/meson.build | 3 +-
hw/ppc/Kconfig | 1 +
10 files changed, 138 insertions(+), 95 deletions(-)
create mode 100644 hw/gpio/gpio_poweroff.c
delete mode 100644 hw/gpio/gpio_pwr.c
create mode 100644 hw/gpio/gpio_restart.c
--
2.46.1
next reply other threads:[~2024-09-23 10:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-23 10:15 Bernhard Beschow [this message]
2024-09-23 10:15 ` [PATCH 1/3] MAINTAINERS: Add hw/gpio/gpio_pwr.c Bernhard Beschow
2024-09-23 10:15 ` [PATCH 2/3] hw/gpio/gpio_pwr: Split into separate gpio_poweroff and gpio_restart devices Bernhard Beschow
2024-09-23 10:15 ` [PATCH 3/3] hw/ppc/e500: Reuse TYPE_GPIO_POWEROFF Bernhard Beschow
2024-09-30 12:57 ` [PATCH 0/3] Split TYPE_GPIOPWR and reuse in E500 machines Peter Maydell
2024-10-05 10:11 ` Bernhard Beschow
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=20240923101554.12900-1-shentey@gmail.com \
--to=shentey@gmail.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--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).