diff options
-rw-r--r-- | arch/powerpc/platforms/maple/setup.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c index 094989d50bab..f12d5c69e74d 100644 --- a/arch/powerpc/platforms/maple/setup.c +++ b/arch/powerpc/platforms/maple/setup.c | |||
@@ -60,6 +60,7 @@ | |||
60 | #include <asm/of_device.h> | 60 | #include <asm/of_device.h> |
61 | #include <asm/lmb.h> | 61 | #include <asm/lmb.h> |
62 | #include <asm/mpic.h> | 62 | #include <asm/mpic.h> |
63 | #include <asm/rtas.h> | ||
63 | #include <asm/udbg.h> | 64 | #include <asm/udbg.h> |
64 | 65 | ||
65 | #include "maple.h" | 66 | #include "maple.h" |
@@ -166,6 +167,16 @@ struct smp_ops_t maple_smp_ops = { | |||
166 | }; | 167 | }; |
167 | #endif /* CONFIG_SMP */ | 168 | #endif /* CONFIG_SMP */ |
168 | 169 | ||
170 | static void __init maple_use_rtas_reboot_and_halt_if_present(void) | ||
171 | { | ||
172 | if (rtas_service_present("system-reboot") && | ||
173 | rtas_service_present("power-off")) { | ||
174 | ppc_md.restart = rtas_restart; | ||
175 | ppc_md.power_off = rtas_power_off; | ||
176 | ppc_md.halt = rtas_halt; | ||
177 | } | ||
178 | } | ||
179 | |||
169 | void __init maple_setup_arch(void) | 180 | void __init maple_setup_arch(void) |
170 | { | 181 | { |
171 | /* init to some ~sane value until calibrate_delay() runs */ | 182 | /* init to some ~sane value until calibrate_delay() runs */ |
@@ -181,6 +192,7 @@ void __init maple_setup_arch(void) | |||
181 | #ifdef CONFIG_DUMMY_CONSOLE | 192 | #ifdef CONFIG_DUMMY_CONSOLE |
182 | conswitchp = &dummy_con; | 193 | conswitchp = &dummy_con; |
183 | #endif | 194 | #endif |
195 | maple_use_rtas_reboot_and_halt_if_present(); | ||
184 | 196 | ||
185 | printk(KERN_DEBUG "Using native/NAP idle loop\n"); | 197 | printk(KERN_DEBUG "Using native/NAP idle loop\n"); |
186 | } | 198 | } |