All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: kernel: document ARM CPUs clock-frequency property
@ 2013-06-19  9:47 ` Florian Fainelli
  0 siblings, 0 replies; 10+ messages in thread
From: Florian Fainelli @ 2013-06-19  9:47 UTC (permalink / raw)
  To: lorenzo.pieralisi
  Cc: Florian Fainelli, nico, devicetree-discuss, rob.herring,
	grant.likely, linux-arm-kernel

ARM CPU device tree nodes may contain an optional clock-frequency
property, when set, this property must contain the CPU frequency in Hz,
which is then used by the topology parsing code in
arch/arm/kernel/topology.c to infer the CPU capacity.

Document this property to avoid any possible confusion on the
clock-frequency unit.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 Documentation/devicetree/bindings/arm/cpus.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt
index f32494d..a33b956 100644
--- a/Documentation/devicetree/bindings/arm/cpus.txt
+++ b/Documentation/devicetree/bindings/arm/cpus.txt
@@ -45,6 +45,8 @@ For the ARM architecture every CPU node must contain the following properties:
 		"marvell,xsc3"
 		"marvell,xscale"
 
+- clock-frequency : The frequency of the CPU, in Hz. Optional.
+
 Example:
 
 	cpus {
-- 
1.8.1.2

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

* [PATCH] ARM: kernel: document ARM CPUs clock-frequency property
@ 2013-06-19  9:47 ` Florian Fainelli
  0 siblings, 0 replies; 10+ messages in thread
From: Florian Fainelli @ 2013-06-19  9:47 UTC (permalink / raw)
  To: linux-arm-kernel

ARM CPU device tree nodes may contain an optional clock-frequency
property, when set, this property must contain the CPU frequency in Hz,
which is then used by the topology parsing code in
arch/arm/kernel/topology.c to infer the CPU capacity.

Document this property to avoid any possible confusion on the
clock-frequency unit.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 Documentation/devicetree/bindings/arm/cpus.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt
index f32494d..a33b956 100644
--- a/Documentation/devicetree/bindings/arm/cpus.txt
+++ b/Documentation/devicetree/bindings/arm/cpus.txt
@@ -45,6 +45,8 @@ For the ARM architecture every CPU node must contain the following properties:
 		"marvell,xsc3"
 		"marvell,xscale"
 
+- clock-frequency : The frequency of the CPU, in Hz. Optional.
+
 Example:
 
 	cpus {
-- 
1.8.1.2

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

* Re: [PATCH] ARM: kernel: document ARM CPUs clock-frequency property
  2013-06-19  9:47 ` Florian Fainelli
@ 2013-06-19 10:04   ` Mark Rutland
  -1 siblings, 0 replies; 10+ messages in thread
From: Mark Rutland @ 2013-06-19 10:04 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Lorenzo Pieralisi, nico, devicetree-discuss, rob.herring,
	grant.likely, linux-arm-kernel

On Wed, Jun 19, 2013 at 10:47:17AM +0100, Florian Fainelli wrote:
> ARM CPU device tree nodes may contain an optional clock-frequency
> property, when set, this property must contain the CPU frequency in Hz,
> which is then used by the topology parsing code in
> arch/arm/kernel/topology.c to infer the CPU capacity.

I see that arch/arm/kernel/topology.c does a pr_err when clock-frequency isn't
present. If we're documenting it as optional, should we not downgrade that or
remove it entirely?

Thanks,
Mark.

> 
> Document this property to avoid any possible confusion on the
> clock-frequency unit.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>  Documentation/devicetree/bindings/arm/cpus.txt | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt
> index f32494d..a33b956 100644
> --- a/Documentation/devicetree/bindings/arm/cpus.txt
> +++ b/Documentation/devicetree/bindings/arm/cpus.txt
> @@ -45,6 +45,8 @@ For the ARM architecture every CPU node must contain the following properties:
>  		"marvell,xsc3"
>  		"marvell,xscale"
>  
> +- clock-frequency : The frequency of the CPU, in Hz. Optional.
> +
>  Example:
>  
>  	cpus {
> -- 
> 1.8.1.2
> 
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

* [PATCH] ARM: kernel: document ARM CPUs clock-frequency property
@ 2013-06-19 10:04   ` Mark Rutland
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Rutland @ 2013-06-19 10:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jun 19, 2013 at 10:47:17AM +0100, Florian Fainelli wrote:
> ARM CPU device tree nodes may contain an optional clock-frequency
> property, when set, this property must contain the CPU frequency in Hz,
> which is then used by the topology parsing code in
> arch/arm/kernel/topology.c to infer the CPU capacity.

I see that arch/arm/kernel/topology.c does a pr_err when clock-frequency isn't
present. If we're documenting it as optional, should we not downgrade that or
remove it entirely?

Thanks,
Mark.

> 
> Document this property to avoid any possible confusion on the
> clock-frequency unit.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>  Documentation/devicetree/bindings/arm/cpus.txt | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt
> index f32494d..a33b956 100644
> --- a/Documentation/devicetree/bindings/arm/cpus.txt
> +++ b/Documentation/devicetree/bindings/arm/cpus.txt
> @@ -45,6 +45,8 @@ For the ARM architecture every CPU node must contain the following properties:
>  		"marvell,xsc3"
>  		"marvell,xscale"
>  
> +- clock-frequency : The frequency of the CPU, in Hz. Optional.
> +
>  Example:
>  
>  	cpus {
> -- 
> 1.8.1.2
> 
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

* Re: [PATCH] ARM: kernel: document ARM CPUs clock-frequency property
  2013-06-19 10:04   ` Mark Rutland
@ 2013-06-19 10:27     ` Florian Fainelli
  -1 siblings, 0 replies; 10+ messages in thread
From: Florian Fainelli @ 2013-06-19 10:27 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Lorenzo Pieralisi, nico, devicetree-discuss, rob.herring,
	grant.likely, linux-arm-kernel

Hello Mark,

2013/6/19 Mark Rutland <mark.rutland@arm.com>:
> On Wed, Jun 19, 2013 at 10:47:17AM +0100, Florian Fainelli wrote:
>> ARM CPU device tree nodes may contain an optional clock-frequency
>> property, when set, this property must contain the CPU frequency in Hz,
>> which is then used by the topology parsing code in
>> arch/arm/kernel/topology.c to infer the CPU capacity.
>
> I see that arch/arm/kernel/topology.c does a pr_err when clock-frequency isn't
> present. If we're documenting it as optional, should we not downgrade that or
> remove it entirely?

Good question. I think it might be good to just dowgrade the error to
a simple warning, we should clearly be fixing the binding if we have a
device_type = "cpu" property but no clock-frequency property.
--
Florian

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

* [PATCH] ARM: kernel: document ARM CPUs clock-frequency property
@ 2013-06-19 10:27     ` Florian Fainelli
  0 siblings, 0 replies; 10+ messages in thread
From: Florian Fainelli @ 2013-06-19 10:27 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Mark,

2013/6/19 Mark Rutland <mark.rutland@arm.com>:
> On Wed, Jun 19, 2013 at 10:47:17AM +0100, Florian Fainelli wrote:
>> ARM CPU device tree nodes may contain an optional clock-frequency
>> property, when set, this property must contain the CPU frequency in Hz,
>> which is then used by the topology parsing code in
>> arch/arm/kernel/topology.c to infer the CPU capacity.
>
> I see that arch/arm/kernel/topology.c does a pr_err when clock-frequency isn't
> present. If we're documenting it as optional, should we not downgrade that or
> remove it entirely?

Good question. I think it might be good to just dowgrade the error to
a simple warning, we should clearly be fixing the binding if we have a
device_type = "cpu" property but no clock-frequency property.
--
Florian

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

* Re: [PATCH] ARM: kernel: document ARM CPUs clock-frequency property
  2013-06-19 10:27     ` Florian Fainelli
@ 2013-06-19 11:23         ` Lorenzo Pieralisi
  -1 siblings, 0 replies; 10+ messages in thread
From: Lorenzo Pieralisi @ 2013-06-19 11:23 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: nico-QSEj5FYQhm4dnm+yROfE0A,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ,
	grant.likely-QSEj5FYQhm4dnm+yROfE0A,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Wed, Jun 19, 2013 at 11:27:50AM +0100, Florian Fainelli wrote:
> Hello Mark,
> 
> 2013/6/19 Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>:
> > On Wed, Jun 19, 2013 at 10:47:17AM +0100, Florian Fainelli wrote:
> >> ARM CPU device tree nodes may contain an optional clock-frequency
> >> property, when set, this property must contain the CPU frequency in Hz,
> >> which is then used by the topology parsing code in
> >> arch/arm/kernel/topology.c to infer the CPU capacity.
> >
> > I see that arch/arm/kernel/topology.c does a pr_err when clock-frequency isn't
> > present. If we're documenting it as optional, should we not downgrade that or
> > remove it entirely?
> 
> Good question. I think it might be good to just dowgrade the error to
> a simple warning, we should clearly be fixing the binding if we have a
> device_type = "cpu" property but no clock-frequency property.

Well, this means that that pr_err will trigger as soon as the dts
updates hit the mainline, now probably it is silent because cpu nodes
for architectures with "arm,cortex-a15" as cpus miss device_type = "cpu".
ePAPR defines "clock-frequency" as required.

So either we downgrade it to optional or we are in for another slew of dts
updates, I am really looking forward to that. Certainly it has to be added
to the bindings.

Thoughts ?

Lorenzo

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

* [PATCH] ARM: kernel: document ARM CPUs clock-frequency property
@ 2013-06-19 11:23         ` Lorenzo Pieralisi
  0 siblings, 0 replies; 10+ messages in thread
From: Lorenzo Pieralisi @ 2013-06-19 11:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jun 19, 2013 at 11:27:50AM +0100, Florian Fainelli wrote:
> Hello Mark,
> 
> 2013/6/19 Mark Rutland <mark.rutland@arm.com>:
> > On Wed, Jun 19, 2013 at 10:47:17AM +0100, Florian Fainelli wrote:
> >> ARM CPU device tree nodes may contain an optional clock-frequency
> >> property, when set, this property must contain the CPU frequency in Hz,
> >> which is then used by the topology parsing code in
> >> arch/arm/kernel/topology.c to infer the CPU capacity.
> >
> > I see that arch/arm/kernel/topology.c does a pr_err when clock-frequency isn't
> > present. If we're documenting it as optional, should we not downgrade that or
> > remove it entirely?
> 
> Good question. I think it might be good to just dowgrade the error to
> a simple warning, we should clearly be fixing the binding if we have a
> device_type = "cpu" property but no clock-frequency property.

Well, this means that that pr_err will trigger as soon as the dts
updates hit the mainline, now probably it is silent because cpu nodes
for architectures with "arm,cortex-a15" as cpus miss device_type = "cpu".
ePAPR defines "clock-frequency" as required.

So either we downgrade it to optional or we are in for another slew of dts
updates, I am really looking forward to that. Certainly it has to be added
to the bindings.

Thoughts ?

Lorenzo

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

* Re: [PATCH] ARM: kernel: document ARM CPUs clock-frequency property
  2013-06-19 11:23         ` Lorenzo Pieralisi
@ 2013-06-19 13:11           ` Florian Fainelli
  -1 siblings, 0 replies; 10+ messages in thread
From: Florian Fainelli @ 2013-06-19 13:11 UTC (permalink / raw)
  To: Lorenzo Pieralisi
  Cc: Mark Rutland, nico, devicetree-discuss, rob.herring,
	grant.likely, linux-arm-kernel

2013/6/19 Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>:
> On Wed, Jun 19, 2013 at 11:27:50AM +0100, Florian Fainelli wrote:
>> Hello Mark,
>>
>> 2013/6/19 Mark Rutland <mark.rutland@arm.com>:
>> > On Wed, Jun 19, 2013 at 10:47:17AM +0100, Florian Fainelli wrote:
>> >> ARM CPU device tree nodes may contain an optional clock-frequency
>> >> property, when set, this property must contain the CPU frequency in Hz,
>> >> which is then used by the topology parsing code in
>> >> arch/arm/kernel/topology.c to infer the CPU capacity.
>> >
>> > I see that arch/arm/kernel/topology.c does a pr_err when clock-frequency isn't
>> > present. If we're documenting it as optional, should we not downgrade that or
>> > remove it entirely?
>>
>> Good question. I think it might be good to just dowgrade the error to
>> a simple warning, we should clearly be fixing the binding if we have a
>> device_type = "cpu" property but no clock-frequency property.
>
> Well, this means that that pr_err will trigger as soon as the dts
> updates hit the mainline, now probably it is silent because cpu nodes
> for architectures with "arm,cortex-a15" as cpus miss device_type = "cpu".
> ePAPR defines "clock-frequency" as required.

Correct. I am also fine with documenting this property as mandatory.

>
> So either we downgrade it to optional or we are in for another slew of dts
> updates, I am really looking forward to that. Certainly it has to be added
> to the bindings.
>
> Thoughts ?

Well, the fix would be twofold:
- for platforms which already have an "arm,cortex-a15" CPU nodes but
lack a clock phandle or a clock-frequency add it
- update arch/arm/kernel/toplogy.c to fetch the clock phandle and rate
if specified (e.g: ecx-2000)

Here is a list of platforms/DTS that would appear to need fixing:
- exynos5440.dtsi
- tegra114.dtsi
- vexpress-v2p-ca15-tc1.dts
- vexpress-v2p-ca15_a7.dts
- xenvm-4.2.dts

As far as I am concerned, the DTB passed to my kernel is already okay,
but certainly this needs fixing for in-tree DTS files.
--
Florian

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

* [PATCH] ARM: kernel: document ARM CPUs clock-frequency property
@ 2013-06-19 13:11           ` Florian Fainelli
  0 siblings, 0 replies; 10+ messages in thread
From: Florian Fainelli @ 2013-06-19 13:11 UTC (permalink / raw)
  To: linux-arm-kernel

2013/6/19 Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>:
> On Wed, Jun 19, 2013 at 11:27:50AM +0100, Florian Fainelli wrote:
>> Hello Mark,
>>
>> 2013/6/19 Mark Rutland <mark.rutland@arm.com>:
>> > On Wed, Jun 19, 2013 at 10:47:17AM +0100, Florian Fainelli wrote:
>> >> ARM CPU device tree nodes may contain an optional clock-frequency
>> >> property, when set, this property must contain the CPU frequency in Hz,
>> >> which is then used by the topology parsing code in
>> >> arch/arm/kernel/topology.c to infer the CPU capacity.
>> >
>> > I see that arch/arm/kernel/topology.c does a pr_err when clock-frequency isn't
>> > present. If we're documenting it as optional, should we not downgrade that or
>> > remove it entirely?
>>
>> Good question. I think it might be good to just dowgrade the error to
>> a simple warning, we should clearly be fixing the binding if we have a
>> device_type = "cpu" property but no clock-frequency property.
>
> Well, this means that that pr_err will trigger as soon as the dts
> updates hit the mainline, now probably it is silent because cpu nodes
> for architectures with "arm,cortex-a15" as cpus miss device_type = "cpu".
> ePAPR defines "clock-frequency" as required.

Correct. I am also fine with documenting this property as mandatory.

>
> So either we downgrade it to optional or we are in for another slew of dts
> updates, I am really looking forward to that. Certainly it has to be added
> to the bindings.
>
> Thoughts ?

Well, the fix would be twofold:
- for platforms which already have an "arm,cortex-a15" CPU nodes but
lack a clock phandle or a clock-frequency add it
- update arch/arm/kernel/toplogy.c to fetch the clock phandle and rate
if specified (e.g: ecx-2000)

Here is a list of platforms/DTS that would appear to need fixing:
- exynos5440.dtsi
- tegra114.dtsi
- vexpress-v2p-ca15-tc1.dts
- vexpress-v2p-ca15_a7.dts
- xenvm-4.2.dts

As far as I am concerned, the DTB passed to my kernel is already okay,
but certainly this needs fixing for in-tree DTS files.
--
Florian

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

end of thread, other threads:[~2013-06-19 13:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-19  9:47 [PATCH] ARM: kernel: document ARM CPUs clock-frequency property Florian Fainelli
2013-06-19  9:47 ` Florian Fainelli
2013-06-19 10:04 ` Mark Rutland
2013-06-19 10:04   ` Mark Rutland
2013-06-19 10:27   ` Florian Fainelli
2013-06-19 10:27     ` Florian Fainelli
     [not found]     ` <CAGVrzcY8oxZ7zUbThvXgsVyEGBCsxcvu4R0it_9s9wsKkJ3W0w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-19 11:23       ` Lorenzo Pieralisi
2013-06-19 11:23         ` Lorenzo Pieralisi
2013-06-19 13:11         ` Florian Fainelli
2013-06-19 13:11           ` Florian Fainelli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.