devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fixup! cpufreq: SPEAr: Add CPUFreq driver
@ 2012-11-27 12:31 Viresh Kumar
  2012-11-27 19:05 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Viresh Kumar @ 2012-11-27 12:31 UTC (permalink / raw)
  To: rjw
  Cc: spear-devel, devicetree-discuss, linux-arm-kernel, cpufreq,
	Viresh Kumar

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
Hi Rafael,

To make review easier and faster, i am sending incremental patch for SPEAr
cpufreq driver. This patch was earlier discussed here:

http://lists.infradead.org/pipermail/linux-arm-kernel/2012-November/135088.html

 .../devicetree/bindings/cpufreq/cpufreq-spear.txt  | 33 +++++++++++++++-------
 drivers/cpufreq/spear-cpufreq.c                    |  4 +--
 2 files changed, 25 insertions(+), 12 deletions(-)

diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-spear.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-spear.txt
index 4cf2819..f3d44984 100644
--- a/Documentation/devicetree/bindings/cpufreq/cpufreq-spear.txt
+++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-spear.txt
@@ -6,7 +6,6 @@ It supports both uniprocessor (UP) and symmetric multiprocessor (SMP) systems
 which share clock across all CPUs.
 
 Required properties:
-- compatible: "st,cpufreq-spear"
 - cpufreq_tbl: Table of frequencies CPU could be transitioned into, in the
   increasing order.
 
@@ -14,16 +13,30 @@ Optional properties:
 - clock-latency: Specify the possible maximum transition latency for clock, in
   unit of nanoseconds.
 
+Both required and optional properties listed above must be defined under node
+/cpus/cpu@0.
+
 Examples:
 --------
+cpus {
+
+	<...>
+
+	cpu@0 {
+		compatible = "arm,cortex-a9";
+		reg = <0>;
+
+		<...>
+
+		cpufreq_tbl = < 166000
+				200000
+				250000
+				300000
+				400000
+				500000
+				600000 >;
+	};
+
+	<...>
 
-cpufreq {
-	compatible = "st,cpufreq-spear";
-	cpufreq_tbl = < 166000
-			200000
-			250000
-			300000
-			400000
-			500000
-			600000 >;
 };
diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c
index a7fe880..4575cfe 100644
--- a/drivers/cpufreq/spear-cpufreq.c
+++ b/drivers/cpufreq/spear-cpufreq.c
@@ -224,9 +224,9 @@ static int spear_cpufreq_driver_init(void)
 	const __be32 *val;
 	int cnt, i, ret;
 
-	np = of_find_compatible_node(NULL, NULL, "st,cpufreq-spear");
+	np = of_find_node_by_path("/cpus/cpu@0");
 	if (!np) {
-		pr_err("No cpufreq node found");
+		pr_err("No cpu node found");
 		return -ENODEV;
 	}
 
-- 
1.7.12.rc2.18.g61b472e


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fixup! cpufreq: SPEAr: Add CPUFreq driver
  2012-11-27 12:31 [PATCH] fixup! cpufreq: SPEAr: Add CPUFreq driver Viresh Kumar
@ 2012-11-27 19:05 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2012-11-27 19:05 UTC (permalink / raw)
  To: linux-pm
  Cc: Viresh Kumar, spear-devel, devicetree-discuss, linux-arm-kernel,
	cpufreq

On Tuesday, November 27, 2012 06:01:39 PM Viresh Kumar wrote:
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> Hi Rafael,
> 
> To make review easier and faster, i am sending incremental patch for SPEAr
> cpufreq driver. This patch was earlier discussed here:
> 
> http://lists.infradead.org/pipermail/linux-arm-kernel/2012-November/135088.html

Applied.

Thanks,
Rafael


>  .../devicetree/bindings/cpufreq/cpufreq-spear.txt  | 33 +++++++++++++++-------
>  drivers/cpufreq/spear-cpufreq.c                    |  4 +--
>  2 files changed, 25 insertions(+), 12 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-spear.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-spear.txt
> index 4cf2819..f3d44984 100644
> --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-spear.txt
> +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-spear.txt
> @@ -6,7 +6,6 @@ It supports both uniprocessor (UP) and symmetric multiprocessor (SMP) systems
>  which share clock across all CPUs.
>  
>  Required properties:
> -- compatible: "st,cpufreq-spear"
>  - cpufreq_tbl: Table of frequencies CPU could be transitioned into, in the
>    increasing order.
>  
> @@ -14,16 +13,30 @@ Optional properties:
>  - clock-latency: Specify the possible maximum transition latency for clock, in
>    unit of nanoseconds.
>  
> +Both required and optional properties listed above must be defined under node
> +/cpus/cpu@0.
> +
>  Examples:
>  --------
> +cpus {
> +
> +	<...>
> +
> +	cpu@0 {
> +		compatible = "arm,cortex-a9";
> +		reg = <0>;
> +
> +		<...>
> +
> +		cpufreq_tbl = < 166000
> +				200000
> +				250000
> +				300000
> +				400000
> +				500000
> +				600000 >;
> +	};
> +
> +	<...>
>  
> -cpufreq {
> -	compatible = "st,cpufreq-spear";
> -	cpufreq_tbl = < 166000
> -			200000
> -			250000
> -			300000
> -			400000
> -			500000
> -			600000 >;
>  };
> diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c
> index a7fe880..4575cfe 100644
> --- a/drivers/cpufreq/spear-cpufreq.c
> +++ b/drivers/cpufreq/spear-cpufreq.c
> @@ -224,9 +224,9 @@ static int spear_cpufreq_driver_init(void)
>  	const __be32 *val;
>  	int cnt, i, ret;
>  
> -	np = of_find_compatible_node(NULL, NULL, "st,cpufreq-spear");
> +	np = of_find_node_by_path("/cpus/cpu@0");
>  	if (!np) {
> -		pr_err("No cpufreq node found");
> +		pr_err("No cpu node found");
>  		return -ENODEV;
>  	}
>  
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-27 19:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-27 12:31 [PATCH] fixup! cpufreq: SPEAr: Add CPUFreq driver Viresh Kumar
2012-11-27 19:05 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).