提交 a413d2ce 编写于 作者: D Dmitry Osipenko 提交者: Rafael J. Wysocki

cpufreq: tegra20: Check if this is Tegra20 machine

Don't even try to request the clocks during of module initialization on
non-Tegra20 machines (this is the case for a multi-platform kernel) for
consistency.
Signed-off-by: NDmitry Osipenko <digetx@gmail.com>
Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
Acked-by: NThierry Reding <treding@nvidia.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 f39d4d5e
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <linux/err.h> #include <linux/err.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/of.h>
#include <linux/types.h> #include <linux/types.h>
static struct cpufreq_frequency_table freq_table[] = { static struct cpufreq_frequency_table freq_table[] = {
...@@ -158,6 +159,9 @@ static int __init tegra_cpufreq_init(void) ...@@ -158,6 +159,9 @@ static int __init tegra_cpufreq_init(void)
{ {
int err; int err;
if (!of_machine_is_compatible("nvidia,tegra20"))
return -ENODEV;
cpu_clk = clk_get_sys(NULL, "cclk"); cpu_clk = clk_get_sys(NULL, "cclk");
if (IS_ERR(cpu_clk)) if (IS_ERR(cpu_clk))
return PTR_ERR(cpu_clk); return PTR_ERR(cpu_clk);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册