[PATCH v2 02/20] powerpc/xmon: Support either ppc_md.power_off or pm_power_off
Alexander Graf
agraf at suse.de
Tue Oct 14 01:01:10 AEDT 2014
Xmon can manually turn off the machine. We now have 2 code paths for this:
1) ppc_md.power_off
2) pm_power_off
This patch allows xmon to support both and makes sure it graciously allows
a path to not be implemented.
Signed-off-by: Alexander Graf <agraf at suse.de>
---
arch/powerpc/xmon/xmon.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index b988b5a..531f649 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -981,7 +981,10 @@ static void bootcmds(void)
else if (cmd == 'h')
ppc_md.halt();
else if (cmd == 'p')
- ppc_md.power_off();
+ if (ppc_md.power_off)
+ ppc_md.power_off();
+ if (pm_power_off)
+ pm_power_off();
}
static int cpu_cmd(void)
--
1.8.1.4
More information about the Linuxppc-dev
mailing list