PPC: E500: Add power off GPIO
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | PPC: Add MPC8XXX gpio controllerhw/ hw/ | +218 | 0 replies | |
| 2/3 | PPC: E500: Instantiate MPC8XXX gpio controller on virt machinehw/ hw/ hw/ | +34 | 0 replies | |
| 3/3 | PPC: E500: Hook up power off GPIO to GPIO controllerhw/ | +24 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Qemu-devel] [PATCH 0/3] PPC: E500: Add power off GPIO
When running a virtual machine, you eventually want to shut it down and see it properly end the QEMU process. The magic that makes this work is the "power off" code path that a guest OS uses to indicate that it wants to power off the host machine.
This logic was missing from our e500 virt machine. The easiest way to implement this is to expose a GPIO to the guest that allows the virtual machine to indicate to QEMU that it wants to power down now.
To expose this GPIO to the guest, we need to add a GPIO controller, the GPIO hookup and some description in device tree. This is what this patch set does.
We only support this for the e500 virt machine though, as the mpc8544ds does not support power off from an OS.
To make use of this logic, you will also need patches to Linux that enable it to register the gpio-poweroff driver:
https://lists.ozlabs.org/pipermail/linuxppc-dev/2014-October/121532.html
And you need to make sure that the following options are enabled in your guest kernel:
CONFIG_POWER_SUPPLY=y
CONFIG_POWER_RESET=y
CONFIG_POWER_RESET_GPIO=y
Alexander Graf (3):
PPC: Add MPC8XXX gpio controller
PPC: E500: Instantiate MPC8XXX gpio controller on virt machine
PPC: E500: Hook up power off GPIO to GPIO controller
hw/gpio/Makefile.objs | 1 + hw/gpio/mpc8xxx.c | 217 ++++++++++++++++++++++++++++++++++++++++++++++++++ hw/ppc/e500.c | 56 +++++++++++++ hw/ppc/e500.h | 1 + hw/ppc/e500plat.c | 1 + 5 files changed, 276 insertions(+) create mode 100644 hw/gpio/mpc8xxx.c
Signature · 1 line
1.8.1.4