linux/arch/powerpc/platforms/embedded6xx
Alexander Graf 9178ba294b powerpc: Convert power off logic to pm_power_off
The generic Linux framework to power off the machine is a function pointer
called pm_power_off. The trick about this pointer is that device drivers can
potentially implement it rather than board files.

Today on powerpc we set pm_power_off to invoke our generic full machine power
off logic which then calls ppc_md.power_off to invoke machine specific power
off.

However, when we want to add a power off GPIO via the "gpio-poweroff" driver,
this card house falls apart. That driver only registers itself if pm_power_off
is NULL to ensure it doesn't override board specific logic. However, since we
always set pm_power_off to the generic power off logic (which will just not
power off the machine if no ppc_md.power_off call is implemented), we can't
implement power off via the generic GPIO power off driver.

To fix this up, let's get rid of the ppc_md.power_off logic and just always use
pm_power_off as was intended. Then individual drivers such as the GPIO power off
driver can implement power off logic via that function pointer.

With this patch set applied and a few patches on top of QEMU that implement a
power off GPIO on the virt e500 machine, I can successfully turn off my virtual
machine after halt.

Signed-off-by: Alexander Graf <agraf@suse.de>
[mpe: Squash into one patch and update changelog based on cover letter]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2014-11-03 12:12:51 +11:00
..
c2k.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
flipper-pic.c powerpc: add explicit OF includes 2013-10-09 20:04:11 -05:00
flipper-pic.h powerpc: gamecube/wii: flipper interrupt controller support 2009-12-12 22:24:28 -07:00
gamecube.c powerpc: Convert power off logic to pm_power_off 2014-11-03 12:12:51 +11:00
hlwd-pic.c powerpc: Delete non-required instances of include <linux/init.h> 2014-01-15 13:46:44 +11:00
hlwd-pic.h powerpc: wii: hollywood interrupt controller support 2009-12-12 22:24:30 -07:00
holly.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
Kconfig powerpc/legacy_serial: Support MVME5100 UARTS with shifted registers 2014-04-28 17:36:25 +10:00
linkstation.c powerpc: Convert power off logic to pm_power_off 2014-11-03 12:12:51 +11:00
ls_uart.c [POWERPC] 82xx and embedded6xx: Use machine_*_initcall() hooks in platform code 2008-01-28 08:30:41 -06:00
Makefile powerpc: Delete old PrPMC 280/2800 support 2014-03-07 15:54:48 +11:00
mpc10x.h powerpc/pci: Support per-aperture memory offset 2013-05-06 13:40:40 +10:00
mpc7448_hpc2.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
mvme5100.c powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
storcenter.c powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
usbgecko_udbg.c powerpc/gamecube/wii: Fix off-by-one error in ugecon/usbgecko_udbg 2009-12-18 15:13:57 +11:00
usbgecko_udbg.h powerpc: gamecube/wii: early debugging using usbgecko 2009-12-12 22:24:31 -07:00
wii.c powerpc: Convert power off logic to pm_power_off 2014-11-03 12:12:51 +11:00