2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-25 05:34:00 +08:00
linux-next/arch/powerpc/platforms/ps3
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
..
device-init.c powerpc/irq: Remove IRQF_DISABLED 2011-11-08 14:51:46 +11:00
exports.c powerpc: remove non-required uses of include <linux/module.h> 2011-10-31 19:30:44 -04:00
gelic_udbg.c powerpc/ps3: Add gelic udbg driver 2011-09-20 09:20:05 +10:00
htab.c powerpc/mm: handle hugepage size correctly when invalidating hpte entries 2013-06-21 16:01:52 +10:00
hvcall.S [POWERPC] ps3: add lv1 hvcalls 2006-12-04 20:40:44 +11:00
interrupt.c irq_domain: Move irq_virq_count into NOMAP revmap 2012-04-12 00:37:48 -06:00
Kconfig usb: host: remove selects of USB_ARCH_HAS_?HCI 2014-02-18 12:36:38 -08:00
Makefile powerpc/ps3: Add gelic udbg driver 2011-09-20 09:20:05 +10:00
mm.c powerpc/ps3: Add highmem region memory early 2012-04-24 15:34:18 -07:00
os-area.c powerpc+of: Rename the drivers/of prom_* functions to of_* 2012-11-15 12:56:52 +11:00
platform.h powerpc/ps3: Add highmem repository read routines 2012-04-24 15:34:17 -07:00
repository.c POWERPC: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
setup.c powerpc: Convert power off logic to pm_power_off 2014-11-03 12:12:51 +11:00
smp.c powerpc: Implement tick broadcast IPI as a fixed IPI message 2014-03-05 15:55:04 +11:00
spu.c powerpc/ps3: Remove inline marking of EXPORT_SYMBOL functions 2013-12-02 14:06:53 +11:00
system-bus.c PowerPC: adapt for dma_map_ops changes 2012-03-28 16:36:33 +02:00
time.c PTR_RET is now PTR_ERR_OR_ZERO(): Replace most. 2013-07-15 11:25:01 +09:30