]> err.no Git - linux-2.6/commitdiff
powerpc: Fix CHRP booting - needs a define_machine call
authorPaul Mackerras <paulus@samba.org>
Mon, 3 Apr 2006 06:37:23 +0000 (16:37 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 5 Apr 2006 06:01:45 +0000 (16:01 +1000)
The patch removing _machine and converting platforms over to use
define_machine wasn't complete as far as CHRP was concerned.  This
adds the define_machine call for CHRP and gets it booting again.

Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/chrp/chrp.h
arch/powerpc/platforms/chrp/pci.c
arch/powerpc/platforms/chrp/setup.c

index 63f0aee4c158e97df652e49b43d00551aaa21e03..996c28744e96a6d206a5f778dd562b5f30b3cf44 100644 (file)
@@ -9,3 +9,4 @@ extern long chrp_time_init(void);
 
 extern void chrp_find_bridges(void);
 extern void chrp_event_scan(unsigned long);
+extern void chrp_pcibios_fixup(void);
index 8ef279ad36ad15ddbd5500835b1580fb04134955..ac224876ce5943f999a0def0007f7214cd35ff9a 100644 (file)
@@ -23,6 +23,8 @@
 #include <asm/grackle.h>
 #include <asm/rtas.h>
 
+#include "chrp.h"
+
 /* LongTrail */
 void __iomem *gg2_pci_config_base;
 
@@ -314,6 +316,6 @@ chrp_find_bridges(void)
        }
 
        /* Do not fixup interrupts from OF tree on pegasos */
-       if (is_pegasos == 0)
-               ppc_md.pcibios_fixup = chrp_pcibios_fixup;
+       if (is_pegasos)
+               ppc_md.pcibios_fixup = NULL;
 }
index 23a2017187049d721dcac2f3b49efe82b1f221f1..18d89f38796b458d9953b93672893c528b537acf 100644 (file)
@@ -440,8 +440,6 @@ void __init chrp_init_IRQ(void)
 
        if (_chrp_type == _CHRP_Pegasos)
                ppc_md.get_irq        = i8259_irq;
-       else
-               ppc_md.get_irq        = mpic_get_irq;
 
 #if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(XMON)
        /* see if there is a keyboard in the device tree
@@ -528,26 +526,24 @@ static int __init chrp_probe(void)
        /* Assume we have an 8259... */
        __irq_offset_value = NUM_ISA_INTERRUPTS;
 
-       ppc_md.setup_arch     = chrp_setup_arch;
-       ppc_md.show_cpuinfo   = chrp_show_cpuinfo;
-
-       ppc_md.init_IRQ       = chrp_init_IRQ;
-       ppc_md.init           = chrp_init2;
-
-       ppc_md.phys_mem_access_prot = pci_phys_mem_access_prot;
-
-       ppc_md.restart        = rtas_restart;
-       ppc_md.power_off      = rtas_power_off;
-       ppc_md.halt           = rtas_halt;
-
-       ppc_md.time_init      = chrp_time_init;
-       ppc_md.calibrate_decr = generic_calibrate_decr;
-
-       /* this may get overridden with rtas routines later... */
-       ppc_md.set_rtc_time   = chrp_set_rtc_time;
-       ppc_md.get_rtc_time   = chrp_get_rtc_time;
-
-#ifdef CONFIG_SMP
-       smp_ops = &chrp_smp_ops;
-#endif /* CONFIG_SMP */
+       return 1;
 }
+
+define_machine(chrp) {
+       .name                   = "CHRP",
+       .probe                  = chrp_probe,
+       .setup_arch             = chrp_setup_arch,
+       .init                   = chrp_init2,
+       .show_cpuinfo           = chrp_show_cpuinfo,
+       .init_IRQ               = chrp_init_IRQ,
+       .get_irq                = mpic_get_irq,
+       .pcibios_fixup          = chrp_pcibios_fixup,
+       .restart                = rtas_restart,
+       .power_off              = rtas_power_off,
+       .halt                   = rtas_halt,
+       .time_init              = chrp_time_init,
+       .set_rtc_time           = chrp_set_rtc_time,
+       .get_rtc_time           = chrp_get_rtc_time,
+       .calibrate_decr         = generic_calibrate_decr,
+       .phys_mem_access_prot   = pci_phys_mem_access_prot,
+};