printk(KERN_INFO "-- custom unit(s)\n");
 }
 
-static struct device_node *setup_find_cpu_node(int cpu)
-{
-       u32 hwid;
-       struct device_node *cpun;
-
-       for_each_of_cpu_node(cpun) {
-               if (of_property_read_u32(cpun, "reg", &hwid))
-                       continue;
-               if (hwid == cpu)
-                       return cpun;
-       }
-
-       return NULL;
-}
-
 void __init setup_cpuinfo(void)
 {
        struct device_node *cpu;
        int cpu_id = smp_processor_id();
        struct cpuinfo_or1k *cpuinfo = &cpuinfo_or1k[cpu_id];
 
-       cpu = setup_find_cpu_node(cpu_id);
+       cpu = of_get_cpu_node(cpu_id, NULL);
        if (!cpu)
                panic("Couldn't find CPU%d in device tree...\n", cpu_id);
 
 void calibrate_delay(void)
 {
        const int *val;
-       struct device_node *cpu = setup_find_cpu_node(smp_processor_id());
+       struct device_node *cpu = of_get_cpu_node(smp_processor_id(), NULL);
 
        val = of_get_property(cpu, "clock-frequency", NULL);
        if (!val)