@@ -21,6 +21,7 @@
#include <linux/sched.h>
#include <linux/adb.h>
#include <linux/pmu.h>
+#include <linux/cpu.h>
#include <linux/cpufreq.h>
#include <linux/init.h>
#include <linux/device.h>
@@ -643,6 +644,7 @@ static int pmac_cpufreq_init_750FX(struct device_node *cpunode)
*/
static int __init pmac_cpufreq_setup(void)
{
+ struct device *cpu_dev;
struct device_node *cpunode;
const u32 *value;
@@ -650,7 +652,14 @@ static int __init pmac_cpufreq_setup(void)
return 0;
/* Assume only one CPU */
- cpunode = of_find_node_by_type(NULL, "cpu");
+ cpu_dev = get_cpu_device(0);
+ if (!cpu_dev) {
+ pr_err("failed to get cpu device\n");
+ return -ENODEV;
+ }
+
+ /* Get first CPU node */
+ cpunode = of_node_get(cpu_dev->of_node);
if (!cpunode)
goto out;