diff options
author | Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com> | 2013-06-17 09:58:48 -0400 |
---|---|---|
committer | Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com> | 2013-08-21 05:29:53 -0400 |
commit | cdc58d602d2e657602a90c190cbf745886c95977 (patch) | |
tree | b2d276265e47f160efcadf99b75fe89f5d7dc4b8 | |
parent | 78b4d6e0fd2695da3019c86133444578d1ceeed3 (diff) |
cpufreq: imx6q-cpufreq: remove device tree parsing for cpu nodes
Now that the cpu device registration initialises the of_node(if available)
appropriately for all the cpus, parsing here is redundant.
This patch removes all DT parsing and uses cpu->of_node instead.
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
-rw-r--r-- | arch/arm/mach-imx/mach-imx6q.c | 3 | ||||
-rw-r--r-- | drivers/cpufreq/imx6q-cpufreq.c | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 7be13f8e69a0..a02f275a198d 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -254,13 +254,12 @@ static void __init imx6q_opp_init(struct device *cpu_dev) | |||
254 | { | 254 | { |
255 | struct device_node *np; | 255 | struct device_node *np; |
256 | 256 | ||
257 | np = of_find_node_by_path("/cpus/cpu@0"); | 257 | np = of_node_get(cpu_dev->of_node); |
258 | if (!np) { | 258 | if (!np) { |
259 | pr_warn("failed to find cpu0 node\n"); | 259 | pr_warn("failed to find cpu0 node\n"); |
260 | return; | 260 | return; |
261 | } | 261 | } |
262 | 262 | ||
263 | cpu_dev->of_node = np; | ||
264 | if (of_init_opp_table(cpu_dev)) { | 263 | if (of_init_opp_table(cpu_dev)) { |
265 | pr_warn("failed to init OPP table\n"); | 264 | pr_warn("failed to init OPP table\n"); |
266 | goto put_node; | 265 | goto put_node; |
diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index e37cdaedbb5b..b16632bb5a56 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c | |||
@@ -221,14 +221,12 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev) | |||
221 | 221 | ||
222 | cpu_dev = &pdev->dev; | 222 | cpu_dev = &pdev->dev; |
223 | 223 | ||
224 | np = of_find_node_by_path("/cpus/cpu@0"); | 224 | np = of_node_get(cpu_dev->of_node); |
225 | if (!np) { | 225 | if (!np) { |
226 | dev_err(cpu_dev, "failed to find cpu0 node\n"); | 226 | dev_err(cpu_dev, "failed to find cpu0 node\n"); |
227 | return -ENOENT; | 227 | return -ENOENT; |
228 | } | 228 | } |
229 | 229 | ||
230 | cpu_dev->of_node = np; | ||
231 | |||
232 | arm_clk = devm_clk_get(cpu_dev, "arm"); | 230 | arm_clk = devm_clk_get(cpu_dev, "arm"); |
233 | pll1_sys_clk = devm_clk_get(cpu_dev, "pll1_sys"); | 231 | pll1_sys_clk = devm_clk_get(cpu_dev, "pll1_sys"); |
234 | pll1_sw_clk = devm_clk_get(cpu_dev, "pll1_sw"); | 232 | pll1_sw_clk = devm_clk_get(cpu_dev, "pll1_sw"); |