Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
[sfrench/cifs-2.6.git] / arch / powerpc / platforms / 85xx / mpc85xx_cds.c
index abc0aca6de4052760ce9b6204eec9604c0a3cef1..1490eb3ce0d3d447b6d2731645db5f1c78203a7b 100644 (file)
@@ -22,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>
@@ -198,7 +197,7 @@ static void __init mpc85xx_cds_pic_init(void)
 #ifdef CONFIG_PPC_I8259
        /* Initialize the i8259 controller */
        for_each_node_by_type(np, "interrupt-controller")
-               if (device_is_compatible(np, "chrp,iic")) {
+               if (of_device_is_compatible(np, "chrp,iic")) {
                        cascade_node = np;
                        break;
                }
@@ -238,7 +237,7 @@ static void __init mpc85xx_cds_setup_arch(void)
        if (cpu != 0) {
                const unsigned int *fp;
 
-               fp = get_property(cpu, "clock-frequency", NULL);
+               fp = of_get_property(cpu, "clock-frequency", NULL);
                if (fp != 0)
                        loops_per_jiffy = *fp / HZ;
                else
@@ -263,12 +262,6 @@ static void __init 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
 }
 
 static void mpc85xx_cds_show_cpuinfo(struct seq_file *m)
@@ -298,11 +291,9 @@ static void 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) {