qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Split TYPE_GPIOPWR and reuse in E500 machines
@ 2024-09-23 10:15 Bernhard Beschow
  2024-09-23 10:15 ` [PATCH 1/3] MAINTAINERS: Add hw/gpio/gpio_pwr.c Bernhard Beschow
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Bernhard Beschow @ 2024-09-23 10:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-arm, Paolo Bonzini, Peter Maydell, qemu-ppc,
	Bernhard Beschow

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-10-05 10:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-23 10:15 [PATCH 0/3] Split TYPE_GPIOPWR and reuse in E500 machines Bernhard Beschow
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

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).