linux/arch/powerpc/platforms/85xx
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
..
bsc913x_qds.c powerpc/mpc85xx: Add BSC9132 QDS Support 2014-05-22 18:08:32 -05:00
bsc913x_rdb.c powerpc/85xx: Add BSC9131 RDB Support 2012-07-10 07:07:22 -05:00
c293pcie.c fsl/pci: The new pci suspend/resume implementation 2014-03-19 22:37:44 -05:00
common.c powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
corenet_generic.c powerpc: Convert power off logic to pm_power_off 2014-11-03 12:12:51 +11:00
ge_imp3a.c fsl/pci: The new pci suspend/resume implementation 2014-03-19 22:37:44 -05:00
Kconfig powerpc/fsl-booke: Add initial T1040/T1042 RDB board support 2014-09-09 18:28:10 -05:00
ksi8560.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
Makefile powerpc/mpc85xx: Add BSC9132 QDS Support 2014-05-22 18:08:32 -05:00
mpc85xx_ads.c powerpc/fsl-pci: Unify pci/pcie initialization code 2012-09-12 14:57:12 -05:00
mpc85xx_cds.c fsl/pci: The new pci suspend/resume implementation 2014-03-19 22:37:44 -05:00
mpc85xx_ds.c fsl/pci: The new pci suspend/resume implementation 2014-03-19 22:37:44 -05:00
mpc85xx_mds.c fsl/pci: The new pci suspend/resume implementation 2014-03-19 22:37:44 -05:00
mpc85xx_rdb.c fsl/pci: The new pci suspend/resume implementation 2014-03-19 22:37:44 -05:00
mpc85xx.h QE: split function mpc85xx_qe_init() into two functions. 2014-03-19 19:37:31 -05:00
mpc8536_ds.c fsl/pci: The new pci suspend/resume implementation 2014-03-19 22:37:44 -05:00
p1010rdb.c fsl/pci: The new pci suspend/resume implementation 2014-03-19 22:37:44 -05:00
p1022_ds.c fsl/pci: The new pci suspend/resume implementation 2014-03-19 22:37:44 -05:00
p1022_rdk.c fsl/pci: The new pci suspend/resume implementation 2014-03-19 22:37:44 -05:00
p1023_rdb.c powerpc/mpc85xx: Remove P1023 RDS support 2014-05-22 18:08:31 -05:00
ppa8548.c powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
qemu_e500.c powerpc/fsl-pci: Limit ZONE_DMA32 to 2GiB on 64-bit platforms 2014-09-03 17:58:22 -05:00
sbc8548.c fsl/pci: The new pci suspend/resume implementation 2014-03-19 22:37:44 -05:00
sgy_cts1000.c powerpc: Convert power off logic to pm_power_off 2014-11-03 12:12:51 +11:00
smp.c powerpc/e6500: Add support for hardware threads 2014-07-29 19:26:20 -05:00
smp.h powerpc/85xx: Move mpc85xx_smp_init() decl to a new "smp.h" 2011-12-07 13:43:06 +11:00
socrates_fpga_pic.c powerpc: add explicit OF includes 2013-10-09 20:04:11 -05:00
socrates_fpga_pic.h
socrates.c powerpc/fsl-pci: Unify pci/pcie initialization code 2012-09-12 14:57:12 -05:00
stx_gp3.c powerpc/fsl-pci: Unify pci/pcie initialization code 2012-09-12 14:57:12 -05:00
tqm85xx.c POWERPC: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
twr_p102x.c QE: split function mpc85xx_qe_init() into two functions. 2014-03-19 19:37:31 -05:00
xes_mpc85xx.c fsl/pci: The new pci suspend/resume implementation 2014-03-19 22:37:44 -05:00