linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] cpufreq: cpufreq-cpu0: cleanups around DT usage
@ 2013-03-11 23:05 Nishanth Menon
  2013-03-11 23:05 ` [PATCH 1/2] cpufreq: cpufreq-cpu0: support for clock which are not in DT yet Nishanth Menon
  2013-03-11 23:05 ` [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup Nishanth Menon
  0 siblings, 2 replies; 15+ messages in thread
From: Nishanth Menon @ 2013-03-11 23:05 UTC (permalink / raw)
  To: cpufreq
  Cc: Nishanth Menon, Rafael J. Wysocki, Santosh Shilimkar, Shawn Guo,
	linux-kernel, linux-pm, linux-omap

The following series arose from trying to use BeagleBoard-XM (OMAP3 variant)
for doing CPU DVFS using cpufreq-cpu0.

This is also an attempt to slowly remove the dependence on omap-cpufreq
driver and be entirely driven off cpufreq-cpu0 driver.

Somewhere in the future, when we have regulators driven off CCF and OMAP
converted to CCF, we could remove the DT regulator requirements as well.

Based on v3.9-rc2 tag

Nishanth Menon (2):
  cpufreq: cpufreq-cpu0: support for clock which are not in DT yet.
  cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup

 .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt   |    6 ++++++
 drivers/cpufreq/cpufreq-cpu0.c                     |   12 +++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: linux-kernel@vger.kernel.org
Cc: cpufreq@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: linux-omap@vger.kernel.org

This series in addition to the following DT changes (temporary):
http://pastebin.com/h5uysj0i

Screen shot of the voltage changes using cpufreq-cpu0 on Xm:
http://goo.gl/vVEjd

OMAP Caveat: AVS+ABB still wont work with just these changes.
More to come as we progress.

-- 
1.7.9.5

Regards,
Nishanth Menon

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

* [PATCH 1/2] cpufreq: cpufreq-cpu0: support for clock which are not in DT yet.
  2013-03-11 23:05 [PATCH 0/2] cpufreq: cpufreq-cpu0: cleanups around DT usage Nishanth Menon
@ 2013-03-11 23:05 ` Nishanth Menon
  2013-03-12  5:03   ` Santosh Shilimkar
  2013-03-12  7:36   ` Shawn Guo
  2013-03-11 23:05 ` [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup Nishanth Menon
  1 sibling, 2 replies; 15+ messages in thread
From: Nishanth Menon @ 2013-03-11 23:05 UTC (permalink / raw)
  To: cpufreq
  Cc: Nishanth Menon, Rafael J. Wysocki, Santosh Shilimkar, Shawn Guo,
	linux-kernel, linux-pm, linux-omap

On certain SoCs like variants of OMAP, the clock conversion to DT
is not complete. In short, the ability to:
cpus {
    cpu@0 {
	clocks = <&cpuclk 0>;
    };
 };
is not possible. However, the clock node is registered.
Allow for clk names to be provided as string so as to be used when needed.
Example (for OMAP3630):
cpus {
    cpu@0 {
	clock-name = "cpufreq_ck";
    };
 };

Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: linux-kernel@vger.kernel.org
Cc: cpufreq@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: linux-omap@vger.kernel.org

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt   |    3 +++
 drivers/cpufreq/cpufreq-cpu0.c                     |    6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
index 4416ccc..f180963 100644
--- a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
+++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
@@ -12,6 +12,9 @@ Required properties:
   for details
 
 Optional properties:
+- clock-name: If the clock is not converted to device tree, then describe
+  the clock name as a string. This may also be replaced with clocks=<&cpuclk>
+  cpu clocks has already been converted to device tree.
 - clock-latency: Specify the possible maximum transition latency for clock,
   in unit of nanoseconds.
 - voltage-tolerance: Specify the CPU voltage tolerance in percentage.
diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
index 4e5b7fb..28223c9 100644
--- a/drivers/cpufreq/cpufreq-cpu0.c
+++ b/drivers/cpufreq/cpufreq-cpu0.c
@@ -180,6 +180,7 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev)
 {
 	struct device_node *np;
 	int ret;
+	const char *clk_name = NULL;
 
 	for_each_child_of_node(of_find_node_by_path("/cpus"), np) {
 		if (of_get_property(np, "operating-points", NULL))
@@ -194,7 +195,10 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev)
 	cpu_dev = &pdev->dev;
 	cpu_dev->of_node = np;
 
-	cpu_clk = devm_clk_get(cpu_dev, NULL);
+	/* If clocks are not in DT yet, allow to define it part of CPU node */
+	of_property_read_string(np, "clock-name", &clk_name);
+
+	cpu_clk = devm_clk_get(cpu_dev, clk_name);
 	if (IS_ERR(cpu_clk)) {
 		ret = PTR_ERR(cpu_clk);
 		pr_err("failed to get cpu0 clock: %d\n", ret);
-- 
1.7.9.5


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

* [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup
  2013-03-11 23:05 [PATCH 0/2] cpufreq: cpufreq-cpu0: cleanups around DT usage Nishanth Menon
  2013-03-11 23:05 ` [PATCH 1/2] cpufreq: cpufreq-cpu0: support for clock which are not in DT yet Nishanth Menon
@ 2013-03-11 23:05 ` Nishanth Menon
  2013-03-12  5:07   ` Santosh Shilimkar
  2013-03-12  7:57   ` Shawn Guo
  1 sibling, 2 replies; 15+ messages in thread
From: Nishanth Menon @ 2013-03-11 23:05 UTC (permalink / raw)
  To: cpufreq
  Cc: Nishanth Menon, Rafael J. Wysocki, Santosh Shilimkar, Shawn Guo,
	linux-kernel, linux-pm, linux-omap

commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver)
now forces platform device to be registered for allowing cpufreq-cpu0
to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c

However, for SoCs that wish to link up using device tree, instead
of platform device, provide compatibility string match:
compatible = "cpufreq,cpu0";

Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: linux-kernel@vger.kernel.org
Cc: cpufreq@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: linux-omap@vger.kernel.org

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt   |    3 +++
 drivers/cpufreq/cpufreq-cpu0.c                     |    6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
index f180963..a5699f0 100644
--- a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
+++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
@@ -10,6 +10,8 @@ under node /cpus/cpu@0.
 Required properties:
 - operating-points: Refer to Documentation/devicetree/bindings/power/opp.txt
   for details
+- compatible: if platform_device is *not* used, should be:
+  "cpufreq,cpu0"
 
 Optional properties:
 - clock-name: If the clock is not converted to device tree, then describe
@@ -24,6 +26,7 @@ Examples:
 cpus {
 	#address-cells = <1>;
 	#size-cells = <0>;
+	compatible = "cpufreq,cpu0";
 
 	cpu@0 {
 		compatible = "arm,cortex-a9";
diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
index 28223c9..a6f0a9b 100644
--- a/drivers/cpufreq/cpufreq-cpu0.c
+++ b/drivers/cpufreq/cpufreq-cpu0.c
@@ -277,9 +277,15 @@ static int cpu0_cpufreq_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static struct of_device_id of_cpu0_cpufreq_match[] = {
+	{ .compatible = "cpufreq,cpu0", },
+	{ /* end */ }
+};
+
 static struct platform_driver cpu0_cpufreq_platdrv = {
 	.driver = {
 		.name	= "cpufreq-cpu0",
+		.of_match_table = of_cpu0_cpufreq_match,
 		.owner	= THIS_MODULE,
 	},
 	.probe		= cpu0_cpufreq_probe,
-- 
1.7.9.5


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

* Re: [PATCH 1/2] cpufreq: cpufreq-cpu0: support for clock which are not in DT yet.
  2013-03-11 23:05 ` [PATCH 1/2] cpufreq: cpufreq-cpu0: support for clock which are not in DT yet Nishanth Menon
@ 2013-03-12  5:03   ` Santosh Shilimkar
  2013-03-12 14:24     ` Benoit Cousson
  2013-03-12  7:36   ` Shawn Guo
  1 sibling, 1 reply; 15+ messages in thread
From: Santosh Shilimkar @ 2013-03-12  5:03 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: cpufreq, Rafael J. Wysocki, Shawn Guo, linux-kernel, linux-pm,
	linux-omap

On Tuesday 12 March 2013 04:35 AM, Nishanth Menon wrote:
> On certain SoCs like variants of OMAP, the clock conversion to DT
> is not complete. In short, the ability to:
> cpus {
>     cpu@0 {
> 	clocks = <&cpuclk 0>;
>     };
>  };
> is not possible. However, the clock node is registered.
> Allow for clk names to be provided as string so as to be used when needed.
> Example (for OMAP3630):
> cpus {
>     cpu@0 {
> 	clock-name = "cpufreq_ck";
>     };
>  };
> 
> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: linux-kernel@vger.kernel.org
> Cc: cpufreq@vger.kernel.org
> Cc: linux-pm@vger.kernel.org
> Cc: linux-omap@vger.kernel.org
> 
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
Seems a reasonable to me.
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>



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

* Re: [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup
  2013-03-11 23:05 ` [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup Nishanth Menon
@ 2013-03-12  5:07   ` Santosh Shilimkar
  2013-03-12 14:28     ` Benoit Cousson
  2013-03-12  7:57   ` Shawn Guo
  1 sibling, 1 reply; 15+ messages in thread
From: Santosh Shilimkar @ 2013-03-12  5:07 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: cpufreq, Rafael J. Wysocki, Shawn Guo, linux-kernel, linux-pm,
	linux-omap, devicetree-discuss

On Tuesday 12 March 2013 04:35 AM, Nishanth Menon wrote:
> commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver)
> now forces platform device to be registered for allowing cpufreq-cpu0
> to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c
> 
> However, for SoCs that wish to link up using device tree, instead
> of platform device, provide compatibility string match:
> compatible = "cpufreq,cpu0";
> 
> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: linux-kernel@vger.kernel.org
> Cc: cpufreq@vger.kernel.org
> Cc: linux-pm@vger.kernel.org
> Cc: linux-omap@vger.kernel.org
> 
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
>  .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt   |    3 +++
>  drivers/cpufreq/cpufreq-cpu0.c                     |    6 ++++++
>  2 files changed, 9 insertions(+)
> 
Looks fine to me. CC'ing dt list in case some one has
comments on binding updates.

Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>


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

* Re: [PATCH 1/2] cpufreq: cpufreq-cpu0: support for clock which are not in DT yet.
  2013-03-11 23:05 ` [PATCH 1/2] cpufreq: cpufreq-cpu0: support for clock which are not in DT yet Nishanth Menon
  2013-03-12  5:03   ` Santosh Shilimkar
@ 2013-03-12  7:36   ` Shawn Guo
  1 sibling, 0 replies; 15+ messages in thread
From: Shawn Guo @ 2013-03-12  7:36 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: cpufreq, Rafael J. Wysocki, Santosh Shilimkar, linux-kernel,
	linux-pm, linux-omap

On Mon, Mar 11, 2013 at 06:05:29PM -0500, Nishanth Menon wrote:
> On certain SoCs like variants of OMAP, the clock conversion to DT
> is not complete. In short, the ability to:
> cpus {
>     cpu@0 {
> 	clocks = <&cpuclk 0>;
>     };
>  };
> is not possible. However, the clock node is registered.
> Allow for clk names to be provided as string so as to be used when needed.
> Example (for OMAP3630):
> cpus {
>     cpu@0 {
> 	clock-name = "cpufreq_ck";
>     };
>  };
> 
I'm not sure why the patch is needed at all.  For platform that is
unable to look up clock from device tree yet, something like the
following in kernel will just help cpufreq-cpu0 find the clock, if
you instantiate cpufreq-cpu0 driver in the same way that
highbank-cpufreq does.

  clk_register_clkdev(cpuclk, NULL, "cpufreq-cpu0.0");

Shawn

> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: linux-kernel@vger.kernel.org
> Cc: cpufreq@vger.kernel.org
> Cc: linux-pm@vger.kernel.org
> Cc: linux-omap@vger.kernel.org
> 
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
>  .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt   |    3 +++
>  drivers/cpufreq/cpufreq-cpu0.c                     |    6 +++++-
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
> index 4416ccc..f180963 100644
> --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
> +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
> @@ -12,6 +12,9 @@ Required properties:
>    for details
>  
>  Optional properties:
> +- clock-name: If the clock is not converted to device tree, then describe
> +  the clock name as a string. This may also be replaced with clocks=<&cpuclk>
> +  cpu clocks has already been converted to device tree.
>  - clock-latency: Specify the possible maximum transition latency for clock,
>    in unit of nanoseconds.
>  - voltage-tolerance: Specify the CPU voltage tolerance in percentage.
> diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
> index 4e5b7fb..28223c9 100644
> --- a/drivers/cpufreq/cpufreq-cpu0.c
> +++ b/drivers/cpufreq/cpufreq-cpu0.c
> @@ -180,6 +180,7 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev)
>  {
>  	struct device_node *np;
>  	int ret;
> +	const char *clk_name = NULL;
>  
>  	for_each_child_of_node(of_find_node_by_path("/cpus"), np) {
>  		if (of_get_property(np, "operating-points", NULL))
> @@ -194,7 +195,10 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev)
>  	cpu_dev = &pdev->dev;
>  	cpu_dev->of_node = np;
>  
> -	cpu_clk = devm_clk_get(cpu_dev, NULL);
> +	/* If clocks are not in DT yet, allow to define it part of CPU node */
> +	of_property_read_string(np, "clock-name", &clk_name);
> +
> +	cpu_clk = devm_clk_get(cpu_dev, clk_name);
>  	if (IS_ERR(cpu_clk)) {
>  		ret = PTR_ERR(cpu_clk);
>  		pr_err("failed to get cpu0 clock: %d\n", ret);
> -- 
> 1.7.9.5
> 


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

* Re: [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup
  2013-03-11 23:05 ` [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup Nishanth Menon
  2013-03-12  5:07   ` Santosh Shilimkar
@ 2013-03-12  7:57   ` Shawn Guo
  1 sibling, 0 replies; 15+ messages in thread
From: Shawn Guo @ 2013-03-12  7:57 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: cpufreq, Rafael J. Wysocki, Santosh Shilimkar, linux-kernel,
	linux-pm, linux-omap, devicetree-discuss

Copied devicetree-discuss list.

On Mon, Mar 11, 2013 at 06:05:30PM -0500, Nishanth Menon wrote:
> commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver)
> now forces platform device to be registered for allowing cpufreq-cpu0
> to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c
> 
> However, for SoCs that wish to link up using device tree, instead
> of platform device, provide compatibility string match:
> compatible = "cpufreq,cpu0";

This compatible is merely added for asking DT core code to populate
a platform_device for cpufreq driver.  It's not describing
hardware/cpus, and it does not belong to device tree.

Shawn

> 
> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: linux-kernel@vger.kernel.org
> Cc: cpufreq@vger.kernel.org
> Cc: linux-pm@vger.kernel.org
> Cc: linux-omap@vger.kernel.org
> 
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
>  .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt   |    3 +++
>  drivers/cpufreq/cpufreq-cpu0.c                     |    6 ++++++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
> index f180963..a5699f0 100644
> --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
> +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
> @@ -10,6 +10,8 @@ under node /cpus/cpu@0.
>  Required properties:
>  - operating-points: Refer to Documentation/devicetree/bindings/power/opp.txt
>    for details
> +- compatible: if platform_device is *not* used, should be:
> +  "cpufreq,cpu0"
>  
>  Optional properties:
>  - clock-name: If the clock is not converted to device tree, then describe
> @@ -24,6 +26,7 @@ Examples:
>  cpus {
>  	#address-cells = <1>;
>  	#size-cells = <0>;
> +	compatible = "cpufreq,cpu0";
>  
>  	cpu@0 {
>  		compatible = "arm,cortex-a9";
> diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
> index 28223c9..a6f0a9b 100644
> --- a/drivers/cpufreq/cpufreq-cpu0.c
> +++ b/drivers/cpufreq/cpufreq-cpu0.c
> @@ -277,9 +277,15 @@ static int cpu0_cpufreq_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static struct of_device_id of_cpu0_cpufreq_match[] = {
> +	{ .compatible = "cpufreq,cpu0", },
> +	{ /* end */ }
> +};
> +
>  static struct platform_driver cpu0_cpufreq_platdrv = {
>  	.driver = {
>  		.name	= "cpufreq-cpu0",
> +		.of_match_table = of_cpu0_cpufreq_match,
>  		.owner	= THIS_MODULE,
>  	},
>  	.probe		= cpu0_cpufreq_probe,
> -- 
> 1.7.9.5
> 


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

* Re: [PATCH 1/2] cpufreq: cpufreq-cpu0: support for clock which are not in DT yet.
  2013-03-12  5:03   ` Santosh Shilimkar
@ 2013-03-12 14:24     ` Benoit Cousson
  2013-03-12 14:35       ` Nishanth Menon
  0 siblings, 1 reply; 15+ messages in thread
From: Benoit Cousson @ 2013-03-12 14:24 UTC (permalink / raw)
  To: Santosh Shilimkar, Nishanth Menon
  Cc: cpufreq, Rafael J. Wysocki, Shawn Guo, linux-kernel, linux-pm,
	linux-omap

Hi Guys,

On 03/12/2013 06:03 AM, Santosh Shilimkar wrote:
> On Tuesday 12 March 2013 04:35 AM, Nishanth Menon wrote:
>> On certain SoCs like variants of OMAP, the clock conversion to DT
>> is not complete. In short, the ability to:
>> cpus {
>>     cpu@0 {
>> 	clocks = <&cpuclk 0>;
>>     };
>>  };
>> is not possible. However, the clock node is registered.
>> Allow for clk names to be provided as string so as to be used when needed.
>> Example (for OMAP3630):
>> cpus {
>>     cpu@0 {
>> 	clock-name = "cpufreq_ck";
>>     };
>>  };
>>
>> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
>> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> Cc: Shawn Guo <shawn.guo@linaro.org>
>> Cc: linux-kernel@vger.kernel.org
>> Cc: cpufreq@vger.kernel.org
>> Cc: linux-pm@vger.kernel.org
>> Cc: linux-omap@vger.kernel.org
>>
>> Signed-off-by: Nishanth Menon <nm@ti.com>
>> ---
> Seems a reasonable to me.

No, it is not...

You cannot add a temp binding just because the OMAP support is not
there, since the real binding already exist.

You need to register properly a clock provider to be able to reference
it.
If you do need a hacky temp code you could do it in OMAP code but not in
the binding.


Regards,
Benoit

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

* Re: [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup
  2013-03-12  5:07   ` Santosh Shilimkar
@ 2013-03-12 14:28     ` Benoit Cousson
  2013-03-12 14:35       ` Santosh Shilimkar
  2013-03-12 14:43       ` Nishanth Menon
  0 siblings, 2 replies; 15+ messages in thread
From: Benoit Cousson @ 2013-03-12 14:28 UTC (permalink / raw)
  To: Santosh Shilimkar, Nishanth Menon
  Cc: linux-pm, devicetree-discuss, linux-kernel, cpufreq,
	Rafael J. Wysocki, linux-omap

On 03/12/2013 06:07 AM, Santosh Shilimkar wrote:
> On Tuesday 12 March 2013 04:35 AM, Nishanth Menon wrote:
>> commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver)
>> now forces platform device to be registered for allowing cpufreq-cpu0
>> to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c
>>
>> However, for SoCs that wish to link up using device tree, instead
>> of platform device, provide compatibility string match:
>> compatible = "cpufreq,cpu0";

You cannot add a non-HW relative binding... DT is supposed to represent
the pure HW.
AFAIK, cpufreq has nothing to do with the HW definition.

>>
>> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
>> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> Cc: Shawn Guo <shawn.guo@linaro.org>
>> Cc: linux-kernel@vger.kernel.org
>> Cc: cpufreq@vger.kernel.org
>> Cc: linux-pm@vger.kernel.org
>> Cc: linux-omap@vger.kernel.org
>>
>> Signed-off-by: Nishanth Menon <nm@ti.com>
>> ---
>>  .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt   |    3 +++
>>  drivers/cpufreq/cpufreq-cpu0.c                     |    6 ++++++
>>  2 files changed, 9 insertions(+)
>>
> Looks fine to me. CC'ing dt list in case some one has
> comments on binding updates.
> 
> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

Not-Acked-by-me.

Regards,
Benoit




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

* Re: [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup
  2013-03-12 14:28     ` Benoit Cousson
@ 2013-03-12 14:35       ` Santosh Shilimkar
  2013-03-12 14:43       ` Nishanth Menon
  1 sibling, 0 replies; 15+ messages in thread
From: Santosh Shilimkar @ 2013-03-12 14:35 UTC (permalink / raw)
  To: Benoit Cousson
  Cc: Nishanth Menon, linux-pm, devicetree-discuss, linux-kernel,
	cpufreq, Rafael J. Wysocki, linux-omap

On Tuesday 12 March 2013 07:58 PM, Benoit Cousson wrote:
> On 03/12/2013 06:07 AM, Santosh Shilimkar wrote:
>> On Tuesday 12 March 2013 04:35 AM, Nishanth Menon wrote:
>>> commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver)
>>> now forces platform device to be registered for allowing cpufreq-cpu0
>>> to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c
>>>
>>> However, for SoCs that wish to link up using device tree, instead
>>> of platform device, provide compatibility string match:
>>> compatible = "cpufreq,cpu0";
> 
> You cannot add a non-HW relative binding... DT is supposed to represent
> the pure HW.
> AFAIK, cpufreq has nothing to do with the HW definition.
> 
You are right. 

>>>
>>> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
>>> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>> Cc: Shawn Guo <shawn.guo@linaro.org>
>>> Cc: linux-kernel@vger.kernel.org
>>> Cc: cpufreq@vger.kernel.org
>>> Cc: linux-pm@vger.kernel.org
>>> Cc: linux-omap@vger.kernel.org
>>>
>>> Signed-off-by: Nishanth Menon <nm@ti.com>
>>> ---
>>>  .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt   |    3 +++
>>>  drivers/cpufreq/cpufreq-cpu0.c                     |    6 ++++++
>>>  2 files changed, 9 insertions(+)
>>>
>> Looks fine to me. CC'ing dt list in case some one has
>> comments on binding updates.
>>
>> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> 
> Not-Acked-by-me.
> 
I obviously missed the point while acking the patch.

Regards,
santosh



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

* Re: [PATCH 1/2] cpufreq: cpufreq-cpu0: support for clock which are not in DT yet.
  2013-03-12 14:24     ` Benoit Cousson
@ 2013-03-12 14:35       ` Nishanth Menon
  2013-03-12 15:17         ` J, KEERTHY
  0 siblings, 1 reply; 15+ messages in thread
From: Nishanth Menon @ 2013-03-12 14:35 UTC (permalink / raw)
  To: Benoit Cousson
  Cc: Santosh Shilimkar, cpufreq, Rafael J. Wysocki, Shawn Guo,
	linux-kernel, linux-pm, linux-omap

On 15:24-20130312, Benoit Cousson wrote:
> Hi Guys,
> 
> On 03/12/2013 06:03 AM, Santosh Shilimkar wrote:
> > On Tuesday 12 March 2013 04:35 AM, Nishanth Menon wrote:
> >> On certain SoCs like variants of OMAP, the clock conversion to DT
> >> is not complete. In short, the ability to:
> >> cpus {
> >>     cpu@0 {
> >> 	clocks = <&cpuclk 0>;
> >>     };
> >>  };
> >> is not possible. However, the clock node is registered.
> >> Allow for clk names to be provided as string so as to be used when needed.
> >> Example (for OMAP3630):
> >> cpus {
> >>     cpu@0 {
> >> 	clock-name = "cpufreq_ck";
> >>     };
> >>  };
> >>
> >> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
> >> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> >> Cc: Shawn Guo <shawn.guo@linaro.org>
> >> Cc: linux-kernel@vger.kernel.org
> >> Cc: cpufreq@vger.kernel.org
> >> Cc: linux-pm@vger.kernel.org
> >> Cc: linux-omap@vger.kernel.org
> >>
> >> Signed-off-by: Nishanth Menon <nm@ti.com>
> >> ---
> > Seems a reasonable to me.
> 
> No, it is not...
> 
> You cannot add a temp binding just because the OMAP support is not
> there, since the real binding already exist.
> 
> You need to register properly a clock provider to be able to reference
> it.
> If you do need a hacky temp code you could do it in OMAP code but not in
> the binding.

OK. My intent is to remove omap-cpufreq.c. So, I guess I could do
something like the following (not tested yet), but would that be the
right approach?

diff --git a/arch/arm/mach-omap2/cclock2420_data.c b/arch/arm/mach-omap2/cclock2420_data.c
index 0f0a97c..c3017deb 100644
--- a/arch/arm/mach-omap2/cclock2420_data.c
+++ b/arch/arm/mach-omap2/cclock2420_data.c
@@ -1885,7 +1885,7 @@ static struct omap_clk omap2420_clks[] = {
 	CLK(NULL,	"timer_32k_ck",	&func_32k_ck,	CK_242X),
 	CLK(NULL,	"timer_sys_ck",	&sys_ck,	CK_242X),
 	CLK(NULL,	"timer_ext_ck",	&alt_ck,	CK_242X),
-	CLK(NULL,	"cpufreq_ck",	&virt_prcm_set,	CK_242X),
+	CLK(NULL,	"cpufreq-cpu0.0",	&virt_prcm_set,	CK_242X),
 };
 
 
diff --git a/arch/arm/mach-omap2/cclock2430_data.c b/arch/arm/mach-omap2/cclock2430_data.c
index aed8f74..7000ca4 100644
--- a/arch/arm/mach-omap2/cclock2430_data.c
+++ b/arch/arm/mach-omap2/cclock2430_data.c
@@ -2001,7 +2001,7 @@ static struct omap_clk omap2430_clks[] = {
 	CLK(NULL,	"timer_32k_ck",  &func_32k_ck,   CK_243X),
 	CLK(NULL,	"timer_sys_ck",	&sys_ck,	CK_243X),
 	CLK(NULL,	"timer_ext_ck",	&alt_ck,	CK_243X),
-	CLK(NULL,	"cpufreq_ck",	&virt_prcm_set,	CK_243X),
+	CLK(NULL,	"cpufreq-cpu0.0",	&virt_prcm_set,	CK_243X),
 };
 
 static const char *enable_init_clks[] = {
diff --git a/arch/arm/mach-omap2/cclock3xxx_data.c b/arch/arm/mach-omap2/cclock3xxx_data.c
index 4579c3c..7a1dfde 100644
--- a/arch/arm/mach-omap2/cclock3xxx_data.c
+++ b/arch/arm/mach-omap2/cclock3xxx_data.c
@@ -3501,7 +3501,7 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK(NULL,	"uart4_ick",	&uart4_ick_am35xx,	CK_AM35XX),
 	CLK(NULL,	"timer_32k_ck",	&omap_32k_fck,  CK_3XXX),
 	CLK(NULL,	"timer_sys_ck",	&sys_ck,	CK_3XXX),
-	CLK(NULL,	"cpufreq_ck",	&dpll1_ck,	CK_3XXX),
+	CLK(NULL,	"cpufreq-cpu0.0",	&dpll1_ck,	CK_3XXX),
 };
 
 static const char *enable_init_clks[] = {
diff --git a/arch/arm/mach-omap2/cclock44xx_data.c b/arch/arm/mach-omap2/cclock44xx_data.c
index 3d58f33..5fad1da 100644
--- a/arch/arm/mach-omap2/cclock44xx_data.c
+++ b/arch/arm/mach-omap2/cclock44xx_data.c
@@ -1660,7 +1660,7 @@ static struct omap_clk omap44xx_clks[] = {
 	CLK("4013a000.timer",	"timer_sys_ck",	&syc_clk_div_ck,	CK_443X),
 	CLK("4013c000.timer",	"timer_sys_ck",	&syc_clk_div_ck,	CK_443X),
 	CLK("4013e000.timer",	"timer_sys_ck",	&syc_clk_div_ck,	CK_443X),
-	CLK(NULL,	"cpufreq_ck",	&dpll_mpu_ck,	CK_443X),
+	CLK(NULL,	"cpufreq-cpu0.0",	&dpll_mpu_ck,	CK_443X),
 };
 
 int __init omap4xxx_clk_init(void)
-- 
Regards,
Nishanth Menon

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

* Re: [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup
  2013-03-12 14:28     ` Benoit Cousson
  2013-03-12 14:35       ` Santosh Shilimkar
@ 2013-03-12 14:43       ` Nishanth Menon
  2013-03-12 15:31         ` Benoit Cousson
  1 sibling, 1 reply; 15+ messages in thread
From: Nishanth Menon @ 2013-03-12 14:43 UTC (permalink / raw)
  To: Benoit Cousson
  Cc: Santosh Shilimkar, linux-pm, devicetree-discuss, linux-kernel,
	cpufreq, Rafael J. Wysocki, linux-omap

On 15:28-20130312, Benoit Cousson wrote:
> On 03/12/2013 06:07 AM, Santosh Shilimkar wrote:
> > On Tuesday 12 March 2013 04:35 AM, Nishanth Menon wrote:
> >> commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver)
> >> now forces platform device to be registered for allowing cpufreq-cpu0
> >> to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c
> >>
> >> However, for SoCs that wish to link up using device tree, instead
> >> of platform device, provide compatibility string match:
> >> compatible = "cpufreq,cpu0";
> 
> You cannot add a non-HW relative binding... DT is supposed to represent
> the pure HW.
> AFAIK, cpufreq has nothing to do with the HW definition.
Ref:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/cpufreq/highbank-cpufreq.c#n61
there is a need for a device of some sort.  in the example above, we
register a dummy device for linking up with cpufreq-cpu0 driver.
what we do in this patch is to indicate that SoC CPUs are managed by
cpufreq-cpu0 driver.

I am a bit curious to see how else would we represent drivers to manage
real h/w devices like CPU? Is the highbank style the recommended way to do
things?
> 
> >>
> >> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
> >> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> >> Cc: Shawn Guo <shawn.guo@linaro.org>
> >> Cc: linux-kernel@vger.kernel.org
> >> Cc: cpufreq@vger.kernel.org
> >> Cc: linux-pm@vger.kernel.org
> >> Cc: linux-omap@vger.kernel.org
> >>
> >> Signed-off-by: Nishanth Menon <nm@ti.com>
> >> ---
> >>  .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt   |    3 +++
> >>  drivers/cpufreq/cpufreq-cpu0.c                     |    6 ++++++
> >>  2 files changed, 9 insertions(+)
> >>
> > Looks fine to me. CC'ing dt list in case some one has
> > comments on binding updates.
> > 
> > Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> 
> Not-Acked-by-me.

-- 
Regards,
Nishanth Menon

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

* RE: [PATCH 1/2] cpufreq: cpufreq-cpu0: support for clock which are not in DT yet.
  2013-03-12 14:35       ` Nishanth Menon
@ 2013-03-12 15:17         ` J, KEERTHY
  2013-03-12 15:51           ` Nishanth Menon
  0 siblings, 1 reply; 15+ messages in thread
From: J, KEERTHY @ 2013-03-12 15:17 UTC (permalink / raw)
  To: Menon, Nishanth, Cousson, Benoit
  Cc: Shilimkar, Santosh, cpufreq, Rafael J. Wysocki, Shawn Guo,
	linux-kernel, linux-pm, linux-omap

Hi Nishanth,

> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of Menon, Nishanth
> Sent: Tuesday, March 12, 2013 8:06 PM
> To: Cousson, Benoit
> Cc: Shilimkar, Santosh; cpufreq; Rafael J. Wysocki; Shawn Guo; linux-
> kernel@vger.kernel.org; linux-pm@vger.kernel.org; linux-
> omap@vger.kernel.org
> Subject: Re: [PATCH 1/2] cpufreq: cpufreq-cpu0: support for clock which
> are not in DT yet.
> 
> On 15:24-20130312, Benoit Cousson wrote:
> > Hi Guys,
> >
> > On 03/12/2013 06:03 AM, Santosh Shilimkar wrote:
> > > On Tuesday 12 March 2013 04:35 AM, Nishanth Menon wrote:
> > >> On certain SoCs like variants of OMAP, the clock conversion to DT
> > >> is not complete. In short, the ability to:
> > >> cpus {
> > >>     cpu@0 {
> > >> 	clocks = <&cpuclk 0>;
> > >>     };
> > >>  };
> > >> is not possible. However, the clock node is registered.
> > >> Allow for clk names to be provided as string so as to be used when
> needed.
> > >> Example (for OMAP3630):
> > >> cpus {
> > >>     cpu@0 {
> > >> 	clock-name = "cpufreq_ck";
> > >>     };
> > >>  };
> > >>
> > >> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
> > >> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> > >> Cc: Shawn Guo <shawn.guo@linaro.org>
> > >> Cc: linux-kernel@vger.kernel.org
> > >> Cc: cpufreq@vger.kernel.org
> > >> Cc: linux-pm@vger.kernel.org
> > >> Cc: linux-omap@vger.kernel.org
> > >>
> > >> Signed-off-by: Nishanth Menon <nm@ti.com>
> > >> ---
> > > Seems a reasonable to me.
> >
> > No, it is not...
> >
> > You cannot add a temp binding just because the OMAP support is not
> > there, since the real binding already exist.
> >
> > You need to register properly a clock provider to be able to
> reference
> > it.
> > If you do need a hacky temp code you could do it in OMAP code but not
> > in the binding.
> 
> OK. My intent is to remove omap-cpufreq.c. So, I guess I could do
> something like the following (not tested yet), but would that be the
> right approach?

Similar attempt was done for am33xx_clks in this by Shawn:

http://www.mail-archive.com/linux-omap@vger.kernel.org/msg84157.html

> 
> diff --git a/arch/arm/mach-omap2/cclock2420_data.c b/arch/arm/mach-
> omap2/cclock2420_data.c
> index 0f0a97c..c3017deb 100644
> --- a/arch/arm/mach-omap2/cclock2420_data.c
> +++ b/arch/arm/mach-omap2/cclock2420_data.c
> @@ -1885,7 +1885,7 @@ static struct omap_clk omap2420_clks[] = {
>  	CLK(NULL,	"timer_32k_ck",	&func_32k_ck,	CK_242X),
>  	CLK(NULL,	"timer_sys_ck",	&sys_ck,	CK_242X),
>  	CLK(NULL,	"timer_ext_ck",	&alt_ck,	CK_242X),
> -	CLK(NULL,	"cpufreq_ck",	&virt_prcm_set,	CK_242X),
> +	CLK(NULL,	"cpufreq-cpu0.0",	&virt_prcm_set,	CK_242X),
>  };
> 
> 
> diff --git a/arch/arm/mach-omap2/cclock2430_data.c b/arch/arm/mach-
> omap2/cclock2430_data.c
> index aed8f74..7000ca4 100644
> --- a/arch/arm/mach-omap2/cclock2430_data.c
> +++ b/arch/arm/mach-omap2/cclock2430_data.c
> @@ -2001,7 +2001,7 @@ static struct omap_clk omap2430_clks[] = {
>  	CLK(NULL,	"timer_32k_ck",  &func_32k_ck,   CK_243X),
>  	CLK(NULL,	"timer_sys_ck",	&sys_ck,	CK_243X),
>  	CLK(NULL,	"timer_ext_ck",	&alt_ck,	CK_243X),
> -	CLK(NULL,	"cpufreq_ck",	&virt_prcm_set,	CK_243X),
> +	CLK(NULL,	"cpufreq-cpu0.0",	&virt_prcm_set,	CK_243X),

Device name and the clk_name should be interchanged right?

Something like this?

CLK("cpufreq-cpu0.0",	 NULL,	&virt_prcm_set,	CK_243X),

If yes the same should apply to all the instances.

>  };
> 
>  static const char *enable_init_clks[] = { diff --git a/arch/arm/mach-
> omap2/cclock3xxx_data.c b/arch/arm/mach-omap2/cclock3xxx_data.c
> index 4579c3c..7a1dfde 100644
> --- a/arch/arm/mach-omap2/cclock3xxx_data.c
> +++ b/arch/arm/mach-omap2/cclock3xxx_data.c
> @@ -3501,7 +3501,7 @@ static struct omap_clk omap3xxx_clks[] = {
>  	CLK(NULL,	"uart4_ick",	&uart4_ick_am35xx,	CK_AM35XX),
>  	CLK(NULL,	"timer_32k_ck",	&omap_32k_fck,  CK_3XXX),
>  	CLK(NULL,	"timer_sys_ck",	&sys_ck,	CK_3XXX),
> -	CLK(NULL,	"cpufreq_ck",	&dpll1_ck,	CK_3XXX),
> +	CLK(NULL,	"cpufreq-cpu0.0",	&dpll1_ck,	CK_3XXX),
>  };
> 
>  static const char *enable_init_clks[] = { diff --git a/arch/arm/mach-
> omap2/cclock44xx_data.c b/arch/arm/mach-omap2/cclock44xx_data.c
> index 3d58f33..5fad1da 100644
> --- a/arch/arm/mach-omap2/cclock44xx_data.c
> +++ b/arch/arm/mach-omap2/cclock44xx_data.c
> @@ -1660,7 +1660,7 @@ static struct omap_clk omap44xx_clks[] = {
>  	CLK("4013a000.timer",	"timer_sys_ck",	&syc_clk_div_ck,
> 	CK_443X),
>  	CLK("4013c000.timer",	"timer_sys_ck",	&syc_clk_div_ck,
> 	CK_443X),
>  	CLK("4013e000.timer",	"timer_sys_ck",	&syc_clk_div_ck,
> 	CK_443X),
> -	CLK(NULL,	"cpufreq_ck",	&dpll_mpu_ck,	CK_443X),
> +	CLK(NULL,	"cpufreq-cpu0.0",	&dpll_mpu_ck,	CK_443X),
>  };
> 
>  int __init omap4xxx_clk_init(void)
> --
> Regards,
> Nishanth Menon
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap"
> in the body of a message to majordomo@vger.kernel.org More majordomo
> info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup
  2013-03-12 14:43       ` Nishanth Menon
@ 2013-03-12 15:31         ` Benoit Cousson
  0 siblings, 0 replies; 15+ messages in thread
From: Benoit Cousson @ 2013-03-12 15:31 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Santosh Shilimkar, linux-pm, devicetree-discuss, linux-kernel,
	cpufreq, Rafael J. Wysocki, linux-omap

On 03/12/2013 03:43 PM, Nishanth Menon wrote:
> On 15:28-20130312, Benoit Cousson wrote:
>> On 03/12/2013 06:07 AM, Santosh Shilimkar wrote:
>>> On Tuesday 12 March 2013 04:35 AM, Nishanth Menon wrote:
>>>> commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver)
>>>> now forces platform device to be registered for allowing cpufreq-cpu0
>>>> to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c
>>>>
>>>> However, for SoCs that wish to link up using device tree, instead
>>>> of platform device, provide compatibility string match:
>>>> compatible = "cpufreq,cpu0";
>>
>> You cannot add a non-HW relative binding... DT is supposed to represent
>> the pure HW.
>> AFAIK, cpufreq has nothing to do with the HW definition.
> Ref:
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/cpufreq/highbank-cpufreq.c#n61
> there is a need for a device of some sort.  in the example above, we
> register a dummy device for linking up with cpufreq-cpu0 driver.
> what we do in this patch is to indicate that SoC CPUs are managed by
> cpufreq-cpu0 driver.
> 
> I am a bit curious to see how else would we represent drivers to manage
> real h/w devices like CPU? Is the highbank style the recommended way to do
> things?

Yep, I don't think this is a very elegant way to do that, but until we
do have a generic DVFS layer, I'm not sure we have any other approach.
But maybe not.

The CPU is the real device, but AFAIK, nobody beside OMAP is
representing the CPU as the device.
But I'd rather use a CPU device than a fake CPUFREQ device.

Regards,
Benoit

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

* Re: [PATCH 1/2] cpufreq: cpufreq-cpu0: support for clock which are not in DT yet.
  2013-03-12 15:17         ` J, KEERTHY
@ 2013-03-12 15:51           ` Nishanth Menon
  0 siblings, 0 replies; 15+ messages in thread
From: Nishanth Menon @ 2013-03-12 15:51 UTC (permalink / raw)
  To: J, KEERTHY
  Cc: Cousson, Benoit, Shilimkar, Santosh, cpufreq, Rafael J. Wysocki,
	Shawn Guo, linux-kernel, linux-pm, linux-omap

On 10:17-20130312, J, KEERTHY wrote:
> > OK. My intent is to remove omap-cpufreq.c. So, I guess I could do
> > something like the following (not tested yet), but would that be the
> > right approach?
> 
> Similar attempt was done for am33xx_clks in this by Shawn:
> 
> http://www.mail-archive.com/linux-omap@vger.kernel.org/msg84157.html
Thanks on the same and all inputs folks. Based on the discussion, will give it
another shot to make the patch apply for all OMAPs - Since we are
gradually transitioning to DT, we should be able to gradually drop
features to being enabled only in DT supported boot. This will allow us
to remove redundant drivers from the kernel. I hope this sounds
reasonable to all.
-- 
Regards,
Nishanth Menon

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

end of thread, other threads:[~2013-03-12 15:51 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-11 23:05 [PATCH 0/2] cpufreq: cpufreq-cpu0: cleanups around DT usage Nishanth Menon
2013-03-11 23:05 ` [PATCH 1/2] cpufreq: cpufreq-cpu0: support for clock which are not in DT yet Nishanth Menon
2013-03-12  5:03   ` Santosh Shilimkar
2013-03-12 14:24     ` Benoit Cousson
2013-03-12 14:35       ` Nishanth Menon
2013-03-12 15:17         ` J, KEERTHY
2013-03-12 15:51           ` Nishanth Menon
2013-03-12  7:36   ` Shawn Guo
2013-03-11 23:05 ` [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup Nishanth Menon
2013-03-12  5:07   ` Santosh Shilimkar
2013-03-12 14:28     ` Benoit Cousson
2013-03-12 14:35       ` Santosh Shilimkar
2013-03-12 14:43       ` Nishanth Menon
2013-03-12 15:31         ` Benoit Cousson
2013-03-12  7:57   ` Shawn Guo

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).