Skip to contentSkip to conversation

ARM: shmobile: Remove opps table check for cpufreq

PATCH New Gaku Inami 3 participants 4 messages Jun 25, 2014 – Jul 9, 2014

Subsystems (4)
lore
Share & tools
lore

Gaku Inami

author
#0 lore raw

PATCH 1/1 ARM: shmobile: Remove opps table check for cpufreq

This patch is based on feedback from Viresh Kumar. Since cpufreq-cpu0 driver has already check opp table, there is no need to same check in mach-shmobile.

---

Based on : renesas-devel-v3.16-rc2-20140623

 arch/arm/mach-shmobile/cpufreq.c |   16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
arch/arm/mach-shmobile/cpufreq.c +1 -15
index e2c868f..8a24b2b 100644
@@ -8,24 +8,10 @@
  * for more details.
  */
 
-#include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 
 int __init shmobile_cpufreq_init(void)
 {
-	struct device_node *np;
-
-	np = of_cpu_device_node_get(0);
-	if (np == NULL) {
-		pr_err("failed to find cpu0 node\n");
-		return 0;
-	}
-
-	if (of_get_property(np, "operating-points", NULL))
-		platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0);
-
-	of_node_put(np);
-
+	platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0);
 	return 0;
 }
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 ARM: shmobile: Remove opps table check for cpufreq

Quoted 8 lines · Gaku Inami

This patch is based on feedback from Viresh Kumar. Since cpufreq-cpu0 driver has already check opp table, there is no need to same check in mach-shmobile.

---

Based on : renesas-devel-v3.16-rc2-20140623

I hope you have tested that this doesn't break it :)

Quoted 23 lines
 arch/arm/mach-shmobile/cpufreq.c |   16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
arch/arm/mach-shmobile/cpufreq.c +0 -8
index e2c868f..8a24b2b 100644
@@ -8,24 +8,10 @@
  * for more details.
  */
 
-#include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 
 int __init shmobile_cpufreq_init(void)
 {
-       struct device_node *np;
-
-       np = of_cpu_device_node_get(0);
-       if (np == NULL) {
-               pr_err("failed to find cpu0 node\n");
-               return 0;

arch/arm/mach-shmobile/cpufreq.c line 17

Quoted 10 lines
arch/arm/mach-shmobile/cpufreq.c +1 -7
-       }
-
-       if (of_get_property(np, "operating-points", NULL))
-               platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0);
-
-       of_node_put(np);
-
+       platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0);
        return 0;
 }

Now that there is nothing else in this file, do you really need a separate file for cpufreq?

author
#2 lore raw

PATCH 1/1 ARM: shmobile: Remove opps table check for cpufreq

Quoted 10 lines · Viresh Kumar
Quoted 8 lines · Gaku Inami

This patch is based on feedback from Viresh Kumar. Since cpufreq-cpu0 driver has already check opp table, there is no need to same check in mach-shmobile.

---

Based on : renesas-devel-v3.16-rc2-20140623

I hope you have tested that this doesn't break it :)

I have already tested this patch.
There was no problem to verify the following cases.
case1 : Normal case
case2 : Opps table is not exist
case3 : CONFIG_GENERIC_CPUFREQ_CPU0 is disabled

Quoted 36 lines
Quoted 23 lines
 arch/arm/mach-shmobile/cpufreq.c |   16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
arch/arm/mach-shmobile/cpufreq.c +0 -8
index e2c868f..8a24b2b 100644
@@ -8,24 +8,10 @@
  * for more details.
  */
 
-#include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 
 int __init shmobile_cpufreq_init(void)
 {
-       struct device_node *np;
-
-       np = of_cpu_device_node_get(0);
-       if (np == NULL) {
-               pr_err("failed to find cpu0 node\n");
-               return 0;

arch/arm/mach-shmobile/cpufreq.c line 17

Quoted 10 lines
arch/arm/mach-shmobile/cpufreq.c +1 -7
-       }
-
-       if (of_get_property(np, "operating-points", NULL))
-               platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0);
-
-       of_node_put(np);
-
+       platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0);
        return 0;
 }

Now that there is nothing else in this file, do you really need a separate file for cpufreq?

Quoted 1 line

Thank you for your ack. I hope to leave this file.
In the future, I will add a fix that depends on Renesas-SoC to this file.

#3 lore raw

PATCH 1/1 ARM: shmobile: Remove opps table check for cpufreq

Quoted 9 lines · Gaku Inami
Quoted 8 lines · Viresh Kumar
Quoted 7 lines · Gaku Inami

This patch is based on feedback from Viresh Kumar. Since cpufreq-cpu0 driver has already check opp table, there is no need to same check in mach-shmobile.

---

Quoted 8 lines
Quoted 2 lines
Quoted 1 line

Based on : renesas-devel-v3.16-rc2-20140623

I hope you have tested that this doesn't break it :)

I have already tested this patch.
There was no problem to verify the following cases.
case1 : Normal case
case2 : Opps table is not exist
case3 : CONFIG_GENERIC_CPUFREQ_CPU0 is disabled

Thanks, and sorry for letting this slip through the cracks. I have queued it up.

Quoted 41 lines
Quoted 36 lines
Quoted 23 lines
 arch/arm/mach-shmobile/cpufreq.c |   16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
arch/arm/mach-shmobile/cpufreq.c +0 -8
index e2c868f..8a24b2b 100644
@@ -8,24 +8,10 @@
  * for more details.
  */
 
-#include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 
 int __init shmobile_cpufreq_init(void)
 {
-       struct device_node *np;
-
-       np = of_cpu_device_node_get(0);
-       if (np == NULL) {
-               pr_err("failed to find cpu0 node\n");
-               return 0;

arch/arm/mach-shmobile/cpufreq.c line 17

Quoted 10 lines
arch/arm/mach-shmobile/cpufreq.c +1 -7
-       }
-
-       if (of_get_property(np, "operating-points", NULL))
-               platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0);
-
-       of_node_put(np);
-
+       platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0);
        return 0;
 }

Now that there is nothing else in this file, do you really need a separate file for cpufreq?

Quoted 1 line

Thank you for your ack. I hope to leave this file.
In the future, I will add a fix that depends on Renesas-SoC to this file.