[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>
This commit is contained in:
Kumar Gala 2006-01-13 10:15:17 -06:00 коммит произвёл Paul Mackerras
Родитель 7a45fb19ce
Коммит b8e383d592
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -100,7 +100,8 @@ void machine_shutdown(void)
void machine_restart(char *cmd) void machine_restart(char *cmd)
{ {
machine_shutdown(); machine_shutdown();
ppc_md.restart(cmd); if (ppc_md.restart)
ppc_md.restart(cmd);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
smp_send_stop(); smp_send_stop();
#endif #endif
@ -112,7 +113,8 @@ void machine_restart(char *cmd)
void machine_power_off(void) void machine_power_off(void)
{ {
machine_shutdown(); machine_shutdown();
ppc_md.power_off(); if (ppc_md.power_off)
ppc_md.power_off();
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
smp_send_stop(); smp_send_stop();
#endif #endif
@ -129,7 +131,8 @@ EXPORT_SYMBOL_GPL(pm_power_off);
void machine_halt(void) void machine_halt(void)
{ {
machine_shutdown(); machine_shutdown();
ppc_md.halt(); if (ppc_md.halt)
ppc_md.halt();
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
smp_send_stop(); smp_send_stop();
#endif #endif