Pull button into test branch
[linux-drm-fsl-dcu.git] / arch / powerpc / platforms / maple / setup.c
index fe6b9bff61b9754cc968491df3e0362bae50ebb7..f12d5c69e74dea275d772308cdcf311da4f54956 100644 (file)
@@ -60,6 +60,7 @@
 #include <asm/of_device.h>
 #include <asm/lmb.h>
 #include <asm/mpic.h>
+#include <asm/rtas.h>
 #include <asm/udbg.h>
 
 #include "maple.h"
@@ -166,6 +167,16 @@ struct smp_ops_t maple_smp_ops = {
 };
 #endif /* CONFIG_SMP */
 
+static void __init maple_use_rtas_reboot_and_halt_if_present(void)
+{
+       if (rtas_service_present("system-reboot") &&
+           rtas_service_present("power-off")) {
+               ppc_md.restart = rtas_restart;
+               ppc_md.power_off = rtas_power_off;
+               ppc_md.halt = rtas_halt;
+       }
+}
+
 void __init maple_setup_arch(void)
 {
        /* init to some ~sane value until calibrate_delay() runs */
@@ -181,6 +192,7 @@ void __init maple_setup_arch(void)
 #ifdef CONFIG_DUMMY_CONSOLE
        conswitchp = &dummy_con;
 #endif
+       maple_use_rtas_reboot_and_halt_if_present();
 
        printk(KERN_DEBUG "Using native/NAP idle loop\n");
 }
@@ -312,7 +324,7 @@ define_machine(maple_md) {
        .setup_arch             = maple_setup_arch,
        .init_early             = maple_init_early,
        .init_IRQ               = maple_init_IRQ,
-       .pcibios_fixup          = maple_pcibios_fixup,
+       .pci_irq_fixup          = maple_pci_irq_fixup,
        .pci_get_legacy_ide_irq = maple_pci_get_legacy_ide_irq,
        .restart                = maple_restart,
        .power_off              = maple_power_off,