diff options
author | Kumar Gala <galak@gate.crashing.org> | 2006-01-13 10:15:17 -0600 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-14 11:12:23 +1100 |
commit | b8e383d592daaa35c944a9083ee92c995dce66ca (patch) | |
tree | c6ca29847f47f3a5cbb77b6529d8982c837d1029 /arch/powerpc/kernel/setup-common.c | |
parent | 7a45fb19cef93574230827e6e2c97ad5760ddecd (diff) | |
download | blackbird-op-linux-b8e383d592daaa35c944a9083ee92c995dce66ca.tar.gz blackbird-op-linux-b8e383d592daaa35c944a9083ee92c995dce66ca.zip |
[PATCH] powerpc: Allow for ppc_md restart, power_off, and halt to be NULL
On a number of embedded reference boards there isn't always a
way to reset, power_off, or halt the board. Rather than having
each board implement a spin loop just let the generic code do
it.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/setup-common.c')
-rw-r--r-- | arch/powerpc/kernel/setup-common.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index d5c52fae023a..be12041c0fc5 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -100,7 +100,8 @@ void machine_shutdown(void) void machine_restart(char *cmd) { machine_shutdown(); - ppc_md.restart(cmd); + if (ppc_md.restart) + ppc_md.restart(cmd); #ifdef CONFIG_SMP smp_send_stop(); #endif @@ -112,7 +113,8 @@ void machine_restart(char *cmd) void machine_power_off(void) { machine_shutdown(); - ppc_md.power_off(); + if (ppc_md.power_off) + ppc_md.power_off(); #ifdef CONFIG_SMP smp_send_stop(); #endif @@ -129,7 +131,8 @@ EXPORT_SYMBOL_GPL(pm_power_off); void machine_halt(void) { machine_shutdown(); - ppc_md.halt(); + if (ppc_md.halt) + ppc_md.halt(); #ifdef CONFIG_SMP smp_send_stop(); #endif |