Skip to content

Commit

Permalink
cpufreq: ARM big LITTLE DT: Return CPUFREQ_ETERNAL if clock-latency i…
Browse files Browse the repository at this point in the history
…sn't found

If "/cpus" node isn't present or "clock-latency" isn't defined we are
returning error currently. Let's return CPUFREQ_ETERNAL instead, so
that we don't fail.

Flag appropriate messages to user in such cases.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Viresh Kumar authored and Rafael J. Wysocki committed May 12, 2013
1 parent 996905f commit 3c792e0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/cpufreq/arm_big_little_dt.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ static int dt_get_transition_latency(struct device *cpu_dev)

parent = of_find_node_by_path("/cpus");
if (!parent) {
pr_err("failed to find OF /cpus\n");
return -ENOENT;
pr_info("Failed to find OF /cpus. Use CPUFREQ_ETERNAL transition latency\n");
return CPUFREQ_ETERNAL;
}

for_each_child_of_node(parent, np) {
Expand All @@ -81,7 +81,8 @@ static int dt_get_transition_latency(struct device *cpu_dev)
return transition_latency;
}

return -ENODEV;
pr_info("clock-latency isn't found, use CPUFREQ_ETERNAL transition latency\n");
return CPUFREQ_ETERNAL;
}

static struct cpufreq_arm_bL_ops dt_bL_ops = {
Expand Down

0 comments on commit 3c792e0

Please sign in to comment.