linux_old1/arch/powerpc/platforms/83xx
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
..
Kconfig powerpc: Remove unused REDBOOT Kconfig parameter 2013-12-30 14:17:00 +11:00
Makefile powerpc/83xx: rename and update kmeter1 2011-03-15 10:06:37 -05:00
asp834x.c powerpc/83xx: consolidate of_platform_bus_probe calls 2011-11-24 02:01:40 -06:00
km83xx.c powerpc/83xx: apply mpc8360e quirk for kmeter1 only when par_io is present 2013-02-13 07:49:07 -06:00
mcu_mpc8349emitx.c powerpc: Convert power off logic to pm_power_off 2014-11-03 12:12:51 +11:00
misc.c powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
mpc83xx.h powerpc/83xx: merge PCI bridge additions 2011-11-24 02:01:40 -06:00
mpc830x_rdb.c powerpc/83xx: make mpc830x_rdb use mpc83xx_setup_pci 2011-11-24 02:01:41 -06:00
mpc831x_rdb.c powerpc/83xx: merge PCI bridge additions 2011-11-24 02:01:40 -06:00
mpc832x_mds.c powerpc: Fix typos in Freescale copyright claims 2012-11-15 13:00:58 +11:00
mpc832x_rdb.c powerpc/83xx: merge PCI bridge additions 2011-11-24 02:01:40 -06:00
mpc834x_itx.c powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
mpc834x_mds.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
mpc836x_mds.c powerpc: Fix typos in Freescale copyright claims 2012-11-15 13:00:58 +11:00
mpc836x_rdk.c powerpc: Fix typos in Freescale copyright claims 2012-11-15 13:00:58 +11:00
mpc837x_mds.c powerpc/83xx: merge PCI bridge additions 2011-11-24 02:01:40 -06:00
mpc837x_rdb.c powerpc: Fix typos in Freescale copyright claims 2012-11-15 13:00:58 +11:00
sbc834x.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
suspend-asm.S tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00
suspend.c powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
usb.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00