Commit b8e383d5 authored by Kumar Gala's avatar Kumar Gala Committed by Paul Mackerras

[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: default avatarKumar Gala <galak@kernel.crashing.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 7a45fb19
...@@ -100,6 +100,7 @@ void machine_shutdown(void) ...@@ -100,6 +100,7 @@ void machine_shutdown(void)
void machine_restart(char *cmd) void machine_restart(char *cmd)
{ {
machine_shutdown(); machine_shutdown();
if (ppc_md.restart)
ppc_md.restart(cmd); ppc_md.restart(cmd);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
smp_send_stop(); smp_send_stop();
...@@ -112,6 +113,7 @@ void machine_restart(char *cmd) ...@@ -112,6 +113,7 @@ void machine_restart(char *cmd)
void machine_power_off(void) void machine_power_off(void)
{ {
machine_shutdown(); machine_shutdown();
if (ppc_md.power_off)
ppc_md.power_off(); ppc_md.power_off();
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
smp_send_stop(); smp_send_stop();
...@@ -129,6 +131,7 @@ EXPORT_SYMBOL_GPL(pm_power_off); ...@@ -129,6 +131,7 @@ EXPORT_SYMBOL_GPL(pm_power_off);
void machine_halt(void) void machine_halt(void)
{ {
machine_shutdown(); machine_shutdown();
if (ppc_md.halt)
ppc_md.halt(); ppc_md.halt();
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
smp_send_stop(); smp_send_stop();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment