Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
[pandora-kernel.git] / arch / powerpc / platforms / 85xx / mpc85xx_cds.c
index 4c1fede..4232686 100644 (file)
@@ -11,7 +11,6 @@
  * option) any later version.
  */
 
-#include <linux/config.h>
 #include <linux/stddef.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
@@ -23,7 +22,6 @@
 #include <linux/console.h>
 #include <linux/delay.h>
 #include <linux/seq_file.h>
-#include <linux/root_dev.h>
 #include <linux/initrd.h>
 #include <linux/module.h>
 #include <linux/fsl_devices.h>
@@ -57,7 +55,6 @@ unsigned long isa_mem_base = 0;
 static int cds_pci_slot = 2;
 static volatile u8 *cadmus;
 
-
 #ifdef CONFIG_PCI
 
 #define ARCADIA_HOST_BRIDGE_IDSEL      17
@@ -65,8 +62,7 @@ static volatile u8 *cadmus;
 
 extern int mpc85xx_pci2_busno;
 
-int
-mpc85xx_exclude_device(u_char bus, u_char devfn)
+static int mpc85xx_exclude_device(u_char bus, u_char devfn)
 {
        if (bus == 0 && PCI_SLOT(devfn) == 0)
                return PCIBIOS_DEVICE_NOT_FOUND;
@@ -82,8 +78,7 @@ mpc85xx_exclude_device(u_char bus, u_char devfn)
                return PCIBIOS_SUCCESSFUL;
 }
 
-void __init
-mpc85xx_cds_pcibios_fixup(void)
+static void __init mpc85xx_cds_pcibios_fixup(void)
 {
        struct pci_dev *dev;
        u_char          c;
@@ -133,26 +128,27 @@ mpc85xx_cds_pcibios_fixup(void)
 
 #ifdef CONFIG_PPC_I8259
 #warning The i8259 PIC support is currently broken
-static void mpc85xx_8259_cascade(unsigned int irq, struct
-               irq_desc *desc, struct pt_regs *regs)
+static void mpc85xx_8259_cascade(unsigned int irq, struct irq_desc *desc)
 {
-       unsigned int cascade_irq = i8259_irq(regs);
+       unsigned int cascade_irq = i8259_irq();
 
        if (cascade_irq != NO_IRQ)
-               generic_handle_irq(cascade_irq, regs);
+               generic_handle_irq(cascade_irq);
 
        desc->chip->eoi(irq);
 }
 #endif /* PPC_I8259 */
 #endif /* CONFIG_PCI */
 
-void __init mpc85xx_cds_pic_init(void)
+static void __init mpc85xx_cds_pic_init(void)
 {
        struct mpic *mpic;
        struct resource r;
        struct device_node *np = NULL;
+#ifdef CONFIG_PPC_I8259
        struct device_node *cascade_node = NULL;
        int cascade_irq;
+#endif
 
        np = of_find_node_by_type(np, "open-pic");
 
@@ -224,12 +220,10 @@ void __init mpc85xx_cds_pic_init(void)
 #endif /* CONFIG_PPC_I8259 */
 }
 
-
 /*
  * Setup the architecture
  */
-static void __init
-mpc85xx_cds_setup_arch(void)
+static void __init mpc85xx_cds_setup_arch(void)
 {
        struct device_node *cpu;
 #ifdef CONFIG_PCI
@@ -268,17 +262,9 @@ mpc85xx_cds_setup_arch(void)
        ppc_md.pcibios_fixup = mpc85xx_cds_pcibios_fixup;
        ppc_md.pci_exclude_device = mpc85xx_exclude_device;
 #endif
-
-#ifdef  CONFIG_ROOT_NFS
-       ROOT_DEV = Root_NFS;
-#else
-       ROOT_DEV = Root_HDA1;
-#endif
 }
 
-
-void
-mpc85xx_cds_show_cpuinfo(struct seq_file *m)
+static void mpc85xx_cds_show_cpuinfo(struct seq_file *m)
 {
        uint pvid, svid, phid1;
        uint memsize = total_memory;
@@ -305,11 +291,9 @@ mpc85xx_cds_show_cpuinfo(struct seq_file *m)
  */
 static int __init mpc85xx_cds_probe(void)
 {
-       /* We always match for now, eventually we should look at
-        * the flat dev tree to ensure this is the board we are
-        * supposed to run on
-        */
-       return 1;
+        unsigned long root = of_get_flat_dt_root();
+
+        return of_flat_dt_is_compatible(root, "MPC85xxCDS");
 }
 
 define_machine(mpc85xx_cds) {