[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/3] Split TYPE_GPIOPWR and reuse in E500 machines
From: |
Bernhard Beschow |
Subject: |
[PATCH 0/3] Split TYPE_GPIOPWR and reuse in E500 machines |
Date: |
Mon, 23 Sep 2024 12:15:51 +0200 |
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
- [PATCH 0/3] Split TYPE_GPIOPWR and reuse in E500 machines,
Bernhard Beschow <=