All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
@ 2013-01-22  1:41 ` Kukjin Kim
  0 siblings, 0 replies; 22+ messages in thread
From: Kukjin Kim @ 2013-01-22  1:41 UTC (permalink / raw)
  To: linux-arm-kernel, linux-samsung-soc; +Cc: Thomas Abraham, Kukjin Kim

From: Thomas Abraham <thomas.ab@samsung.com>

Need to be changed requirements in the 'cpus' node for exynos5440
to specify all the per-cpu interrupts of arch timer.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/boot/dts/exynos5440.dtsi |   20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi
index 5406689..c5bd8ed 100644
--- a/arch/arm/boot/dts/exynos5440.dtsi
+++ b/arch/arm/boot/dts/exynos5440.dtsi
@@ -28,7 +28,10 @@
 			compatible = "arm,cortex-a15";
 			timer {
 				compatible = "arm,armv7-timer";
-				interrupts = <1 13 0xf08>;
+				interrupts = <1 13 0xf08>,
+					     <1 14 0xf08>,
+					     <1 11 0xf08>,
+					     <1 10 0xf08>;
 				clock-frequency = <1000000>;
 			};
 		};
@@ -36,7 +39,10 @@
 			compatible = "arm,cortex-a15";
 			timer {
 				compatible = "arm,armv7-timer";
-				interrupts = <1 14 0xf08>;
+				interrupts = <1 13 0xf08>;
+					     <1 14 0xf08>,
+					     <1 11 0xf08>,
+					     <1 10 0xf08>;
 				clock-frequency = <1000000>;
 			};
 		};
@@ -44,7 +50,10 @@
 			compatible = "arm,cortex-a15";
 			timer {
 				compatible = "arm,armv7-timer";
-				interrupts = <1 14 0xf08>;
+				interrupts = <1 13 0xf08>;
+					     <1 14 0xf08>,
+					     <1 11 0xf08>,
+					     <1 10 0xf08>;
 				clock-frequency = <1000000>;
 			};
 		};
@@ -52,7 +61,10 @@
 			compatible = "arm,cortex-a15";
 			timer {
 				compatible = "arm,armv7-timer";
-				interrupts = <1 14 0xf08>;
+				interrupts = <1 13 0xf08>;
+					     <1 14 0xf08>,
+					     <1 11 0xf08>,
+					     <1 10 0xf08>;
 				clock-frequency = <1000000>;
 			};
 		};
-- 
1.7.10.4

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

* [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
@ 2013-01-22  1:41 ` Kukjin Kim
  0 siblings, 0 replies; 22+ messages in thread
From: Kukjin Kim @ 2013-01-22  1:41 UTC (permalink / raw)
  To: linux-arm-kernel

From: Thomas Abraham <thomas.ab@samsung.com>

Need to be changed requirements in the 'cpus' node for exynos5440
to specify all the per-cpu interrupts of arch timer.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/boot/dts/exynos5440.dtsi |   20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi
index 5406689..c5bd8ed 100644
--- a/arch/arm/boot/dts/exynos5440.dtsi
+++ b/arch/arm/boot/dts/exynos5440.dtsi
@@ -28,7 +28,10 @@
 			compatible = "arm,cortex-a15";
 			timer {
 				compatible = "arm,armv7-timer";
-				interrupts = <1 13 0xf08>;
+				interrupts = <1 13 0xf08>,
+					     <1 14 0xf08>,
+					     <1 11 0xf08>,
+					     <1 10 0xf08>;
 				clock-frequency = <1000000>;
 			};
 		};
@@ -36,7 +39,10 @@
 			compatible = "arm,cortex-a15";
 			timer {
 				compatible = "arm,armv7-timer";
-				interrupts = <1 14 0xf08>;
+				interrupts = <1 13 0xf08>;
+					     <1 14 0xf08>,
+					     <1 11 0xf08>,
+					     <1 10 0xf08>;
 				clock-frequency = <1000000>;
 			};
 		};
@@ -44,7 +50,10 @@
 			compatible = "arm,cortex-a15";
 			timer {
 				compatible = "arm,armv7-timer";
-				interrupts = <1 14 0xf08>;
+				interrupts = <1 13 0xf08>;
+					     <1 14 0xf08>,
+					     <1 11 0xf08>,
+					     <1 10 0xf08>;
 				clock-frequency = <1000000>;
 			};
 		};
@@ -52,7 +61,10 @@
 			compatible = "arm,cortex-a15";
 			timer {
 				compatible = "arm,armv7-timer";
-				interrupts = <1 14 0xf08>;
+				interrupts = <1 13 0xf08>;
+					     <1 14 0xf08>,
+					     <1 11 0xf08>,
+					     <1 10 0xf08>;
 				clock-frequency = <1000000>;
 			};
 		};
-- 
1.7.10.4

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

* Re: [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
  2013-01-22  1:41 ` Kukjin Kim
@ 2013-01-22 10:15   ` Mark Rutland
  -1 siblings, 0 replies; 22+ messages in thread
From: Mark Rutland @ 2013-01-22 10:15 UTC (permalink / raw)
  To: Kukjin Kim; +Cc: linux-arm-kernel, linux-samsung-soc, Thomas Abraham

On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
> From: Thomas Abraham <thomas.ab@samsung.com>
> 
> Need to be changed requirements in the 'cpus' node for exynos5440
> to specify all the per-cpu interrupts of arch timer.

The node(s) for the arch timer should not be in the cpus/cpu@N nodes.
Instead, there should be one node (in the root of the tree).

If this works currently it's only because the driver picks up one of the nodes,
and luckily it's the same as the others. This is not guaranteed to work in
future, and will likely break.

> 
> Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> ---
>  arch/arm/boot/dts/exynos5440.dtsi |   20 ++++++++++++++++----
>  1 file changed, 16 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi
> index 5406689..c5bd8ed 100644
> --- a/arch/arm/boot/dts/exynos5440.dtsi
> +++ b/arch/arm/boot/dts/exynos5440.dtsi
> @@ -28,7 +28,10 @@
>  			compatible = "arm,cortex-a15";
>  			timer {
>  				compatible = "arm,armv7-timer";
> -				interrupts = <1 13 0xf08>;
> +				interrupts = <1 13 0xf08>,
> +					     <1 14 0xf08>,
> +					     <1 11 0xf08>,
> +					     <1 10 0xf08>;

Also, this interrupts list is updated differently to all the other nodes. Typo?

>  				clock-frequency = <1000000>;
>  			};
>  		};
> @@ -36,7 +39,10 @@
>  			compatible = "arm,cortex-a15";
>  			timer {
>  				compatible = "arm,armv7-timer";
> -				interrupts = <1 14 0xf08>;
> +				interrupts = <1 13 0xf08>;
> +					     <1 14 0xf08>,
> +					     <1 11 0xf08>,
> +					     <1 10 0xf08>;
>  				clock-frequency = <1000000>;
>  			};
>  		};
> @@ -44,7 +50,10 @@
>  			compatible = "arm,cortex-a15";
>  			timer {
>  				compatible = "arm,armv7-timer";
> -				interrupts = <1 14 0xf08>;
> +				interrupts = <1 13 0xf08>;
> +					     <1 14 0xf08>,
> +					     <1 11 0xf08>,
> +					     <1 10 0xf08>;
>  				clock-frequency = <1000000>;
>  			};
>  		};
> @@ -52,7 +61,10 @@
>  			compatible = "arm,cortex-a15";
>  			timer {
>  				compatible = "arm,armv7-timer";
> -				interrupts = <1 14 0xf08>;
> +				interrupts = <1 13 0xf08>;
> +					     <1 14 0xf08>,
> +					     <1 11 0xf08>,
> +					     <1 10 0xf08>;
>  				clock-frequency = <1000000>;
>  			};
>  		};
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

Please fix this up to only have one timer node, in the root of the tree.

Thanks,
Mark.

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

* [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
@ 2013-01-22 10:15   ` Mark Rutland
  0 siblings, 0 replies; 22+ messages in thread
From: Mark Rutland @ 2013-01-22 10:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
> From: Thomas Abraham <thomas.ab@samsung.com>
> 
> Need to be changed requirements in the 'cpus' node for exynos5440
> to specify all the per-cpu interrupts of arch timer.

The node(s) for the arch timer should not be in the cpus/cpu at N nodes.
Instead, there should be one node (in the root of the tree).

If this works currently it's only because the driver picks up one of the nodes,
and luckily it's the same as the others. This is not guaranteed to work in
future, and will likely break.

> 
> Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> ---
>  arch/arm/boot/dts/exynos5440.dtsi |   20 ++++++++++++++++----
>  1 file changed, 16 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi
> index 5406689..c5bd8ed 100644
> --- a/arch/arm/boot/dts/exynos5440.dtsi
> +++ b/arch/arm/boot/dts/exynos5440.dtsi
> @@ -28,7 +28,10 @@
>  			compatible = "arm,cortex-a15";
>  			timer {
>  				compatible = "arm,armv7-timer";
> -				interrupts = <1 13 0xf08>;
> +				interrupts = <1 13 0xf08>,
> +					     <1 14 0xf08>,
> +					     <1 11 0xf08>,
> +					     <1 10 0xf08>;

Also, this interrupts list is updated differently to all the other nodes. Typo?

>  				clock-frequency = <1000000>;
>  			};
>  		};
> @@ -36,7 +39,10 @@
>  			compatible = "arm,cortex-a15";
>  			timer {
>  				compatible = "arm,armv7-timer";
> -				interrupts = <1 14 0xf08>;
> +				interrupts = <1 13 0xf08>;
> +					     <1 14 0xf08>,
> +					     <1 11 0xf08>,
> +					     <1 10 0xf08>;
>  				clock-frequency = <1000000>;
>  			};
>  		};
> @@ -44,7 +50,10 @@
>  			compatible = "arm,cortex-a15";
>  			timer {
>  				compatible = "arm,armv7-timer";
> -				interrupts = <1 14 0xf08>;
> +				interrupts = <1 13 0xf08>;
> +					     <1 14 0xf08>,
> +					     <1 11 0xf08>,
> +					     <1 10 0xf08>;
>  				clock-frequency = <1000000>;
>  			};
>  		};
> @@ -52,7 +61,10 @@
>  			compatible = "arm,cortex-a15";
>  			timer {
>  				compatible = "arm,armv7-timer";
> -				interrupts = <1 14 0xf08>;
> +				interrupts = <1 13 0xf08>;
> +					     <1 14 0xf08>,
> +					     <1 11 0xf08>,
> +					     <1 10 0xf08>;
>  				clock-frequency = <1000000>;
>  			};
>  		};
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

Please fix this up to only have one timer node, in the root of the tree.

Thanks,
Mark.

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

* RE: [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
  2013-01-22 10:15   ` Mark Rutland
@ 2013-01-22 22:05     ` Kukjin Kim
  -1 siblings, 0 replies; 22+ messages in thread
From: Kukjin Kim @ 2013-01-22 22:05 UTC (permalink / raw)
  To: 'Mark Rutland'
  Cc: linux-arm-kernel, linux-samsung-soc, 'Thomas Abraham',
	devicetree-discuss, Grant Likely, Rob Herring,
	'Tony Lindgren'

Mark Rutland wrote:
>
+ devicetree-discuss, Grant Likely, Rob Herring and Tony Lindgren
 
> On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
> > From: Thomas Abraham <thomas.ab@samsung.com>
> >
> > Need to be changed requirements in the 'cpus' node for exynos5440
> > to specify all the per-cpu interrupts of arch timer.
> 
> The node(s) for the arch timer should not be in the cpus/cpu@N nodes.
> Instead, there should be one node (in the root of the tree).
> 
Well, I don't think so. As per my understanding, the local timers are
attached to every ARM cores (cpus) and it generates certain interrupt to the
GIC. So the correct representation for this in device tree is to include the
interrupts in the cpu nodes in dts file. Your comments  refer to a
limitation in the Linux kernel implementation of the arch_timer and it
should not result in representing the hardware details incorrectly in the
dts file.

> If this works currently it's only because the driver picks up one of the
nodes,
> and luckily it's the same as the others. This is not guaranteed to work in
> future, and will likely break.
> 
It is up to the Linux kernel implementation of arch_timer to handle the
hardware details in dts file accordingly.

> >
> > Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
> > Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> > ---
> >  arch/arm/boot/dts/exynos5440.dtsi |   20 ++++++++++++++++----
> >  1 file changed, 16 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/exynos5440.dtsi
> b/arch/arm/boot/dts/exynos5440.dtsi
> > index 5406689..c5bd8ed 100644
> > --- a/arch/arm/boot/dts/exynos5440.dtsi
> > +++ b/arch/arm/boot/dts/exynos5440.dtsi
> > @@ -28,7 +28,10 @@
> >  			compatible = "arm,cortex-a15";
> >  			timer {
> >  				compatible = "arm,armv7-timer";
> > -				interrupts = <1 13 0xf08>;
> > +				interrupts = <1 13 0xf08>,
> > +					     <1 14 0xf08>,
> > +					     <1 11 0xf08>,
> > +					     <1 10 0xf08>;
> 
> Also, this interrupts list is updated differently to all the other nodes.
Typo?
> 
Hmm, I think this should be fine. If any concerns, please let me know in
detail.

[...]

Thanks.

- Kukjin

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

* [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
@ 2013-01-22 22:05     ` Kukjin Kim
  0 siblings, 0 replies; 22+ messages in thread
From: Kukjin Kim @ 2013-01-22 22:05 UTC (permalink / raw)
  To: linux-arm-kernel

Mark Rutland wrote:
>
+ devicetree-discuss, Grant Likely, Rob Herring and Tony Lindgren
 
> On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
> > From: Thomas Abraham <thomas.ab@samsung.com>
> >
> > Need to be changed requirements in the 'cpus' node for exynos5440
> > to specify all the per-cpu interrupts of arch timer.
> 
> The node(s) for the arch timer should not be in the cpus/cpu at N nodes.
> Instead, there should be one node (in the root of the tree).
> 
Well, I don't think so. As per my understanding, the local timers are
attached to every ARM cores (cpus) and it generates certain interrupt to the
GIC. So the correct representation for this in device tree is to include the
interrupts in the cpu nodes in dts file. Your comments  refer to a
limitation in the Linux kernel implementation of the arch_timer and it
should not result in representing the hardware details incorrectly in the
dts file.

> If this works currently it's only because the driver picks up one of the
nodes,
> and luckily it's the same as the others. This is not guaranteed to work in
> future, and will likely break.
> 
It is up to the Linux kernel implementation of arch_timer to handle the
hardware details in dts file accordingly.

> >
> > Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
> > Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> > ---
> >  arch/arm/boot/dts/exynos5440.dtsi |   20 ++++++++++++++++----
> >  1 file changed, 16 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/exynos5440.dtsi
> b/arch/arm/boot/dts/exynos5440.dtsi
> > index 5406689..c5bd8ed 100644
> > --- a/arch/arm/boot/dts/exynos5440.dtsi
> > +++ b/arch/arm/boot/dts/exynos5440.dtsi
> > @@ -28,7 +28,10 @@
> >  			compatible = "arm,cortex-a15";
> >  			timer {
> >  				compatible = "arm,armv7-timer";
> > -				interrupts = <1 13 0xf08>;
> > +				interrupts = <1 13 0xf08>,
> > +					     <1 14 0xf08>,
> > +					     <1 11 0xf08>,
> > +					     <1 10 0xf08>;
> 
> Also, this interrupts list is updated differently to all the other nodes.
Typo?
> 
Hmm, I think this should be fine. If any concerns, please let me know in
detail.

[...]

Thanks.

- Kukjin

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

* Re: [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
  2013-01-22 22:05     ` Kukjin Kim
@ 2013-01-23 10:36       ` Mark Rutland
  -1 siblings, 0 replies; 22+ messages in thread
From: Mark Rutland @ 2013-01-23 10:36 UTC (permalink / raw)
  To: Kukjin Kim
  Cc: linux-arm-kernel, linux-samsung-soc, 'Thomas Abraham',
	devicetree-discuss, Grant Likely, rob.herring,
	'Tony Lindgren'

On Tue, Jan 22, 2013 at 10:05:18PM +0000, Kukjin Kim wrote:
> Mark Rutland wrote:
> >
> + devicetree-discuss, Grant Likely, Rob Herring and Tony Lindgren
>  
> > On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
> > > From: Thomas Abraham <thomas.ab@samsung.com>
> > >
> > > Need to be changed requirements in the 'cpus' node for exynos5440
> > > to specify all the per-cpu interrupts of arch timer.
> > 
> > The node(s) for the arch timer should not be in the cpus/cpu@N nodes.
> > Instead, there should be one node (in the root of the tree).
> > 
> Well, I don't think so. As per my understanding, the local timers are
> attached to every ARM cores (cpus) and it generates certain interrupt to the
> GIC. So the correct representation for this in device tree is to include the
> interrupts in the cpu nodes in dts file. Your comments  refer to a
> limitation in the Linux kernel implementation of the arch_timer and it
> should not result in representing the hardware details incorrectly in the
> dts file.

I disagree. The "correct representation" is whatever the devicetree binding
documentation describes. It does not describe placing timer nodes in the cpu
nodes.

> 
> > If this works currently it's only because the driver picks up one of the
> nodes,
> > and luckily it's the same as the others. This is not guaranteed to work in
> > future, and will likely break.
> > 
> It is up to the Linux kernel implementation of arch_timer to handle the
> hardware details in dts file accordingly.

The binding specification does not specify that there should be multiple timer
nodes, nor does it specify that they should be under cpu nodes. The timers,
being a banked resource, can be described with one node.

It is not up to the Linux kernel to handle undocumented variations of bindings.

> 
> > >
> > > Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
> > > Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> > > ---
> > >  arch/arm/boot/dts/exynos5440.dtsi |   20 ++++++++++++++++----
> > >  1 file changed, 16 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/arch/arm/boot/dts/exynos5440.dtsi
> > b/arch/arm/boot/dts/exynos5440.dtsi
> > > index 5406689..c5bd8ed 100644
> > > --- a/arch/arm/boot/dts/exynos5440.dtsi
> > > +++ b/arch/arm/boot/dts/exynos5440.dtsi
> > > @@ -28,7 +28,10 @@
> > >  			compatible = "arm,cortex-a15";
> > >  			timer {
> > >  				compatible = "arm,armv7-timer";
> > > -				interrupts = <1 13 0xf08>;
> > > +				interrupts = <1 13 0xf08>,
> > > +					     <1 14 0xf08>,
> > > +					     <1 11 0xf08>,
> > > +					     <1 10 0xf08>;
> > 
> > Also, this interrupts list is updated differently to all the other nodes.
> Typo?
> > 
> Hmm, I think this should be fine. If any concerns, please let me know in
> detail.

Sorry, I misread the diff. Your patch in fact corrects them to be consistent
where they weren't previously.

> 
> [...]
> 
> Thanks.
> 
> - Kukjin
> 
> 

Thanks,
Mark.

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

* [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
@ 2013-01-23 10:36       ` Mark Rutland
  0 siblings, 0 replies; 22+ messages in thread
From: Mark Rutland @ 2013-01-23 10:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 22, 2013 at 10:05:18PM +0000, Kukjin Kim wrote:
> Mark Rutland wrote:
> >
> + devicetree-discuss, Grant Likely, Rob Herring and Tony Lindgren
>  
> > On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
> > > From: Thomas Abraham <thomas.ab@samsung.com>
> > >
> > > Need to be changed requirements in the 'cpus' node for exynos5440
> > > to specify all the per-cpu interrupts of arch timer.
> > 
> > The node(s) for the arch timer should not be in the cpus/cpu at N nodes.
> > Instead, there should be one node (in the root of the tree).
> > 
> Well, I don't think so. As per my understanding, the local timers are
> attached to every ARM cores (cpus) and it generates certain interrupt to the
> GIC. So the correct representation for this in device tree is to include the
> interrupts in the cpu nodes in dts file. Your comments  refer to a
> limitation in the Linux kernel implementation of the arch_timer and it
> should not result in representing the hardware details incorrectly in the
> dts file.

I disagree. The "correct representation" is whatever the devicetree binding
documentation describes. It does not describe placing timer nodes in the cpu
nodes.

> 
> > If this works currently it's only because the driver picks up one of the
> nodes,
> > and luckily it's the same as the others. This is not guaranteed to work in
> > future, and will likely break.
> > 
> It is up to the Linux kernel implementation of arch_timer to handle the
> hardware details in dts file accordingly.

The binding specification does not specify that there should be multiple timer
nodes, nor does it specify that they should be under cpu nodes. The timers,
being a banked resource, can be described with one node.

It is not up to the Linux kernel to handle undocumented variations of bindings.

> 
> > >
> > > Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
> > > Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> > > ---
> > >  arch/arm/boot/dts/exynos5440.dtsi |   20 ++++++++++++++++----
> > >  1 file changed, 16 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/arch/arm/boot/dts/exynos5440.dtsi
> > b/arch/arm/boot/dts/exynos5440.dtsi
> > > index 5406689..c5bd8ed 100644
> > > --- a/arch/arm/boot/dts/exynos5440.dtsi
> > > +++ b/arch/arm/boot/dts/exynos5440.dtsi
> > > @@ -28,7 +28,10 @@
> > >  			compatible = "arm,cortex-a15";
> > >  			timer {
> > >  				compatible = "arm,armv7-timer";
> > > -				interrupts = <1 13 0xf08>;
> > > +				interrupts = <1 13 0xf08>,
> > > +					     <1 14 0xf08>,
> > > +					     <1 11 0xf08>,
> > > +					     <1 10 0xf08>;
> > 
> > Also, this interrupts list is updated differently to all the other nodes.
> Typo?
> > 
> Hmm, I think this should be fine. If any concerns, please let me know in
> detail.

Sorry, I misread the diff. Your patch in fact corrects them to be consistent
where they weren't previously.

> 
> [...]
> 
> Thanks.
> 
> - Kukjin
> 
> 

Thanks,
Mark.

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

* Re: [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
  2013-01-23 10:36       ` Mark Rutland
@ 2013-01-23 10:55         ` Santosh Shilimkar
  -1 siblings, 0 replies; 22+ messages in thread
From: Santosh Shilimkar @ 2013-01-23 10:55 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Kukjin Kim, linux-samsung-soc, 'Tony Lindgren',
	devicetree-discuss, rob.herring, Grant Likely,
	'Thomas Abraham',
	linux-arm-kernel, Marc Zyngier, Benoit Cousson

Looping Marc, Benoit

On Wednesday 23 January 2013 04:06 PM, Mark Rutland wrote:
> On Tue, Jan 22, 2013 at 10:05:18PM +0000, Kukjin Kim wrote:
>> Mark Rutland wrote:
>>>
>> + devicetree-discuss, Grant Likely, Rob Herring and Tony Lindgren
>>
>>> On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
>>>> From: Thomas Abraham <thomas.ab@samsung.com>
>>>>
>>>> Need to be changed requirements in the 'cpus' node for exynos5440
>>>> to specify all the per-cpu interrupts of arch timer.
>>>
>>> The node(s) for the arch timer should not be in the cpus/cpu@N nodes.
>>> Instead, there should be one node (in the root of the tree).
>>>
>> Well, I don't think so. As per my understanding, the local timers are
>> attached to every ARM cores (cpus) and it generates certain interrupt to the
>> GIC. So the correct representation for this in device tree is to include the
>> interrupts in the cpu nodes in dts file. Your comments  refer to a
>> limitation in the Linux kernel implementation of the arch_timer and it
>> should not result in representing the hardware details incorrectly in the
>> dts file.
>
> I disagree. The "correct representation" is whatever the devicetree binding
> documentation describes. It does not describe placing timer nodes in the cpu
> nodes.
>
This seems to be exact same topic what is getting discussed here [1]
Technically DT is suppose to represent how the hardware is rather than
how the bindings are done.

But as Marc pointed out, the approach taken currently is to not 
duplicate the banked information. The thread [1] isn't concluded
yet but looks like we might want to avoid duplicating the information
considering, more of such duplication needs to follow. e.g gic i/f

Am still waiting on what Benoit has to say ?

Regards,
Santosh

[1] http://www.spinics.net/lists/linux-omap/msg85110.html

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

* [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
@ 2013-01-23 10:55         ` Santosh Shilimkar
  0 siblings, 0 replies; 22+ messages in thread
From: Santosh Shilimkar @ 2013-01-23 10:55 UTC (permalink / raw)
  To: linux-arm-kernel

Looping Marc, Benoit

On Wednesday 23 January 2013 04:06 PM, Mark Rutland wrote:
> On Tue, Jan 22, 2013 at 10:05:18PM +0000, Kukjin Kim wrote:
>> Mark Rutland wrote:
>>>
>> + devicetree-discuss, Grant Likely, Rob Herring and Tony Lindgren
>>
>>> On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
>>>> From: Thomas Abraham <thomas.ab@samsung.com>
>>>>
>>>> Need to be changed requirements in the 'cpus' node for exynos5440
>>>> to specify all the per-cpu interrupts of arch timer.
>>>
>>> The node(s) for the arch timer should not be in the cpus/cpu at N nodes.
>>> Instead, there should be one node (in the root of the tree).
>>>
>> Well, I don't think so. As per my understanding, the local timers are
>> attached to every ARM cores (cpus) and it generates certain interrupt to the
>> GIC. So the correct representation for this in device tree is to include the
>> interrupts in the cpu nodes in dts file. Your comments  refer to a
>> limitation in the Linux kernel implementation of the arch_timer and it
>> should not result in representing the hardware details incorrectly in the
>> dts file.
>
> I disagree. The "correct representation" is whatever the devicetree binding
> documentation describes. It does not describe placing timer nodes in the cpu
> nodes.
>
This seems to be exact same topic what is getting discussed here [1]
Technically DT is suppose to represent how the hardware is rather than
how the bindings are done.

But as Marc pointed out, the approach taken currently is to not 
duplicate the banked information. The thread [1] isn't concluded
yet but looks like we might want to avoid duplicating the information
considering, more of such duplication needs to follow. e.g gic i/f

Am still waiting on what Benoit has to say ?

Regards,
Santosh

[1] http://www.spinics.net/lists/linux-omap/msg85110.html

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

* Re: [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
  2013-01-23 10:36       ` Mark Rutland
@ 2013-01-23 13:55         ` Rob Herring
  -1 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2013-01-23 13:55 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Kukjin Kim, linux-arm-kernel, linux-samsung-soc,
	'Thomas Abraham',
	devicetree-discuss, Grant Likely, 'Tony Lindgren'

On 01/23/2013 04:36 AM, Mark Rutland wrote:
> On Tue, Jan 22, 2013 at 10:05:18PM +0000, Kukjin Kim wrote:
>> Mark Rutland wrote:
>>>
>> + devicetree-discuss, Grant Likely, Rob Herring and Tony Lindgren
>>  
>>> On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
>>>> From: Thomas Abraham <thomas.ab@samsung.com>
>>>>
>>>> Need to be changed requirements in the 'cpus' node for exynos5440
>>>> to specify all the per-cpu interrupts of arch timer.
>>>
>>> The node(s) for the arch timer should not be in the cpus/cpu@N nodes.
>>> Instead, there should be one node (in the root of the tree).
>>>
>> Well, I don't think so. As per my understanding, the local timers are
>> attached to every ARM cores (cpus) and it generates certain interrupt to the
>> GIC. So the correct representation for this in device tree is to include the
>> interrupts in the cpu nodes in dts file. Your comments  refer to a
>> limitation in the Linux kernel implementation of the arch_timer and it
>> should not result in representing the hardware details incorrectly in the
>> dts file.
> 
> I disagree. The "correct representation" is whatever the devicetree binding
> documentation describes. It does not describe placing timer nodes in the cpu
> nodes.

I don't think we should add other nodes to /cpus besides cpu nodes.

The presence of architected timers is defined by the cpu being a
Cortex-A15. So you don't really need a timer node at all. All that is
really needed is the interrupt. You could add interrupts property
directly to each cpu node. The location of PMU nodes has come up
recently as well, and the PMU interrupt could be added as well.

Whether we should change the binding at this point is questionable.
Normally, we wouldn't want to do that, but as this is all pretty new it
may be okay to make an exception here. However, I don't see anything
that is fundamentally broken with the current binding. Multi-cluster
could introduce some issues.

>>
>>> If this works currently it's only because the driver picks up one of the
>> nodes,
>>> and luckily it's the same as the others. This is not guaranteed to work in
>>> future, and will likely break.
>>>
>> It is up to the Linux kernel implementation of arch_timer to handle the
>> hardware details in dts file accordingly.
> 
> The binding specification does not specify that there should be multiple timer
> nodes, nor does it specify that they should be under cpu nodes. The timers,
> being a banked resource, can be described with one node.
> 
> It is not up to the Linux kernel to handle undocumented variations of bindings.

Except things done before documentation was enforced.

Rob

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

* [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
@ 2013-01-23 13:55         ` Rob Herring
  0 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2013-01-23 13:55 UTC (permalink / raw)
  To: linux-arm-kernel

On 01/23/2013 04:36 AM, Mark Rutland wrote:
> On Tue, Jan 22, 2013 at 10:05:18PM +0000, Kukjin Kim wrote:
>> Mark Rutland wrote:
>>>
>> + devicetree-discuss, Grant Likely, Rob Herring and Tony Lindgren
>>  
>>> On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
>>>> From: Thomas Abraham <thomas.ab@samsung.com>
>>>>
>>>> Need to be changed requirements in the 'cpus' node for exynos5440
>>>> to specify all the per-cpu interrupts of arch timer.
>>>
>>> The node(s) for the arch timer should not be in the cpus/cpu at N nodes.
>>> Instead, there should be one node (in the root of the tree).
>>>
>> Well, I don't think so. As per my understanding, the local timers are
>> attached to every ARM cores (cpus) and it generates certain interrupt to the
>> GIC. So the correct representation for this in device tree is to include the
>> interrupts in the cpu nodes in dts file. Your comments  refer to a
>> limitation in the Linux kernel implementation of the arch_timer and it
>> should not result in representing the hardware details incorrectly in the
>> dts file.
> 
> I disagree. The "correct representation" is whatever the devicetree binding
> documentation describes. It does not describe placing timer nodes in the cpu
> nodes.

I don't think we should add other nodes to /cpus besides cpu nodes.

The presence of architected timers is defined by the cpu being a
Cortex-A15. So you don't really need a timer node at all. All that is
really needed is the interrupt. You could add interrupts property
directly to each cpu node. The location of PMU nodes has come up
recently as well, and the PMU interrupt could be added as well.

Whether we should change the binding at this point is questionable.
Normally, we wouldn't want to do that, but as this is all pretty new it
may be okay to make an exception here. However, I don't see anything
that is fundamentally broken with the current binding. Multi-cluster
could introduce some issues.

>>
>>> If this works currently it's only because the driver picks up one of the
>> nodes,
>>> and luckily it's the same as the others. This is not guaranteed to work in
>>> future, and will likely break.
>>>
>> It is up to the Linux kernel implementation of arch_timer to handle the
>> hardware details in dts file accordingly.
> 
> The binding specification does not specify that there should be multiple timer
> nodes, nor does it specify that they should be under cpu nodes. The timers,
> being a banked resource, can be described with one node.
> 
> It is not up to the Linux kernel to handle undocumented variations of bindings.

Except things done before documentation was enforced.

Rob

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

* Re: [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
  2013-01-23 10:55         ` Santosh Shilimkar
@ 2013-01-24 12:42             ` Benoit Cousson
  -1 siblings, 0 replies; 22+ messages in thread
From: Benoit Cousson @ 2013-01-24 12:42 UTC (permalink / raw)
  To: Santosh Shilimkar
  Cc: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, Kukjin Kim,
	'Thomas Abraham',
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi Santosh,

On 01/23/2013 11:55 AM, Santosh Shilimkar wrote:
> Looping Marc, Benoit
> 
> On Wednesday 23 January 2013 04:06 PM, Mark Rutland wrote:
>> On Tue, Jan 22, 2013 at 10:05:18PM +0000, Kukjin Kim wrote:
>>> Mark Rutland wrote:
>>>>
>>> + devicetree-discuss, Grant Likely, Rob Herring and Tony Lindgren
>>>
>>>> On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
>>>>> From: Thomas Abraham <thomas.ab-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
>>>>>
>>>>> Need to be changed requirements in the 'cpus' node for exynos5440
>>>>> to specify all the per-cpu interrupts of arch timer.
>>>>
>>>> The node(s) for the arch timer should not be in the cpus/cpu@N nodes.
>>>> Instead, there should be one node (in the root of the tree).
>>>>
>>> Well, I don't think so. As per my understanding, the local timers are
>>> attached to every ARM cores (cpus) and it generates certain interrupt
>>> to the
>>> GIC. So the correct representation for this in device tree is to
>>> include the
>>> interrupts in the cpu nodes in dts file. Your comments  refer to a
>>> limitation in the Linux kernel implementation of the arch_timer and it
>>> should not result in representing the hardware details incorrectly in
>>> the
>>> dts file.
>>
>> I disagree. The "correct representation" is whatever the devicetree
>> binding
>> documentation describes. It does not describe placing timer nodes in
>> the cpu
>> nodes.
>>
> This seems to be exact same topic what is getting discussed here [1]
> Technically DT is suppose to represent how the hardware is rather than
> how the bindings are done.
> 
> But as Marc pointed out, the approach taken currently is to not
> duplicate the banked information. The thread [1] isn't concluded
> yet but looks like we might want to avoid duplicating the information
> considering, more of such duplication needs to follow. e.g gic i/f
> 
> Am still waiting on what Benoit has to say ?

I agree with you :-)

I'm not sure the binding was properly done to reflect the HW accurately.

A local timer for my point of view should be located in the cpu node
like a L1 cache. Or at least referenced in each cpu by a phandle.

What was the rational to put it in the root?

Regards,
Benoit

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

* [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
@ 2013-01-24 12:42             ` Benoit Cousson
  0 siblings, 0 replies; 22+ messages in thread
From: Benoit Cousson @ 2013-01-24 12:42 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Santosh,

On 01/23/2013 11:55 AM, Santosh Shilimkar wrote:
> Looping Marc, Benoit
> 
> On Wednesday 23 January 2013 04:06 PM, Mark Rutland wrote:
>> On Tue, Jan 22, 2013 at 10:05:18PM +0000, Kukjin Kim wrote:
>>> Mark Rutland wrote:
>>>>
>>> + devicetree-discuss, Grant Likely, Rob Herring and Tony Lindgren
>>>
>>>> On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
>>>>> From: Thomas Abraham <thomas.ab@samsung.com>
>>>>>
>>>>> Need to be changed requirements in the 'cpus' node for exynos5440
>>>>> to specify all the per-cpu interrupts of arch timer.
>>>>
>>>> The node(s) for the arch timer should not be in the cpus/cpu at N nodes.
>>>> Instead, there should be one node (in the root of the tree).
>>>>
>>> Well, I don't think so. As per my understanding, the local timers are
>>> attached to every ARM cores (cpus) and it generates certain interrupt
>>> to the
>>> GIC. So the correct representation for this in device tree is to
>>> include the
>>> interrupts in the cpu nodes in dts file. Your comments  refer to a
>>> limitation in the Linux kernel implementation of the arch_timer and it
>>> should not result in representing the hardware details incorrectly in
>>> the
>>> dts file.
>>
>> I disagree. The "correct representation" is whatever the devicetree
>> binding
>> documentation describes. It does not describe placing timer nodes in
>> the cpu
>> nodes.
>>
> This seems to be exact same topic what is getting discussed here [1]
> Technically DT is suppose to represent how the hardware is rather than
> how the bindings are done.
> 
> But as Marc pointed out, the approach taken currently is to not
> duplicate the banked information. The thread [1] isn't concluded
> yet but looks like we might want to avoid duplicating the information
> considering, more of such duplication needs to follow. e.g gic i/f
> 
> Am still waiting on what Benoit has to say ?

I agree with you :-)

I'm not sure the binding was properly done to reflect the HW accurately.

A local timer for my point of view should be located in the cpu node
like a L1 cache. Or at least referenced in each cpu by a phandle.

What was the rational to put it in the root?

Regards,
Benoit

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

* Re: [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
  2013-01-24 12:42             ` Benoit Cousson
@ 2013-01-24 12:53                 ` Santosh Shilimkar
  -1 siblings, 0 replies; 22+ messages in thread
From: Santosh Shilimkar @ 2013-01-24 12:53 UTC (permalink / raw)
  To: Benoit Cousson, Marc Zyngier
  Cc: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, Kukjin Kim,
	'Thomas Abraham',
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Thursday 24 January 2013 06:12 PM, Benoit Cousson wrote:
> Hi Santosh,
>
> On 01/23/2013 11:55 AM, Santosh Shilimkar wrote:
>> Looping Marc, Benoit
>>
>> On Wednesday 23 January 2013 04:06 PM, Mark Rutland wrote:
>>> On Tue, Jan 22, 2013 at 10:05:18PM +0000, Kukjin Kim wrote:
>>>> Mark Rutland wrote:
>>>>>
>>>> + devicetree-discuss, Grant Likely, Rob Herring and Tony Lindgren
>>>>
>>>>> On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
>>>>>> From: Thomas Abraham <thomas.ab-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
>>>>>>
>>>>>> Need to be changed requirements in the 'cpus' node for exynos5440
>>>>>> to specify all the per-cpu interrupts of arch timer.
>>>>>
>>>>> The node(s) for the arch timer should not be in the cpus/cpu@N nodes.
>>>>> Instead, there should be one node (in the root of the tree).
>>>>>
>>>> Well, I don't think so. As per my understanding, the local timers are
>>>> attached to every ARM cores (cpus) and it generates certain interrupt
>>>> to the
>>>> GIC. So the correct representation for this in device tree is to
>>>> include the
>>>> interrupts in the cpu nodes in dts file. Your comments  refer to a
>>>> limitation in the Linux kernel implementation of the arch_timer and it
>>>> should not result in representing the hardware details incorrectly in
>>>> the
>>>> dts file.
>>>
>>> I disagree. The "correct representation" is whatever the devicetree
>>> binding
>>> documentation describes. It does not describe placing timer nodes in
>>> the cpu
>>> nodes.
>>>
>> This seems to be exact same topic what is getting discussed here [1]
>> Technically DT is suppose to represent how the hardware is rather than
>> how the bindings are done.
>>
>> But as Marc pointed out, the approach taken currently is to not
>> duplicate the banked information. The thread [1] isn't concluded
>> yet but looks like we might want to avoid duplicating the information
>> considering, more of such duplication needs to follow. e.g gic i/f
>>
>> Am still waiting on what Benoit has to say ?
>
> I agree with you :-)
>
> I'm not sure the binding was properly done to reflect the HW accurately.
>
> A local timer for my point of view should be located in the cpu node
> like a L1 cache. Or at least referenced in each cpu by a phandle.
>
> What was the rational to put it in the root?
>
 From Marc's answer it seems to avoid the duplication of data but
I let him elaborate it.

Regards,
Santosh

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

* [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
@ 2013-01-24 12:53                 ` Santosh Shilimkar
  0 siblings, 0 replies; 22+ messages in thread
From: Santosh Shilimkar @ 2013-01-24 12:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday 24 January 2013 06:12 PM, Benoit Cousson wrote:
> Hi Santosh,
>
> On 01/23/2013 11:55 AM, Santosh Shilimkar wrote:
>> Looping Marc, Benoit
>>
>> On Wednesday 23 January 2013 04:06 PM, Mark Rutland wrote:
>>> On Tue, Jan 22, 2013 at 10:05:18PM +0000, Kukjin Kim wrote:
>>>> Mark Rutland wrote:
>>>>>
>>>> + devicetree-discuss, Grant Likely, Rob Herring and Tony Lindgren
>>>>
>>>>> On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
>>>>>> From: Thomas Abraham <thomas.ab@samsung.com>
>>>>>>
>>>>>> Need to be changed requirements in the 'cpus' node for exynos5440
>>>>>> to specify all the per-cpu interrupts of arch timer.
>>>>>
>>>>> The node(s) for the arch timer should not be in the cpus/cpu at N nodes.
>>>>> Instead, there should be one node (in the root of the tree).
>>>>>
>>>> Well, I don't think so. As per my understanding, the local timers are
>>>> attached to every ARM cores (cpus) and it generates certain interrupt
>>>> to the
>>>> GIC. So the correct representation for this in device tree is to
>>>> include the
>>>> interrupts in the cpu nodes in dts file. Your comments  refer to a
>>>> limitation in the Linux kernel implementation of the arch_timer and it
>>>> should not result in representing the hardware details incorrectly in
>>>> the
>>>> dts file.
>>>
>>> I disagree. The "correct representation" is whatever the devicetree
>>> binding
>>> documentation describes. It does not describe placing timer nodes in
>>> the cpu
>>> nodes.
>>>
>> This seems to be exact same topic what is getting discussed here [1]
>> Technically DT is suppose to represent how the hardware is rather than
>> how the bindings are done.
>>
>> But as Marc pointed out, the approach taken currently is to not
>> duplicate the banked information. The thread [1] isn't concluded
>> yet but looks like we might want to avoid duplicating the information
>> considering, more of such duplication needs to follow. e.g gic i/f
>>
>> Am still waiting on what Benoit has to say ?
>
> I agree with you :-)
>
> I'm not sure the binding was properly done to reflect the HW accurately.
>
> A local timer for my point of view should be located in the cpu node
> like a L1 cache. Or at least referenced in each cpu by a phandle.
>
> What was the rational to put it in the root?
>
 From Marc's answer it seems to avoid the duplication of data but
I let him elaborate it.

Regards,
Santosh

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

* Re: [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
  2013-01-24 12:42             ` Benoit Cousson
@ 2013-01-24 13:16               ` Marc Zyngier
  -1 siblings, 0 replies; 22+ messages in thread
From: Marc Zyngier @ 2013-01-24 13:16 UTC (permalink / raw)
  To: Benoit Cousson
  Cc: Santosh Shilimkar, Mark Rutland, Kukjin Kim, linux-samsung-soc,
	'Tony Lindgren',
	devicetree-discuss, rob.herring, Grant Likely,
	'Thomas Abraham',
	linux-arm-kernel

Hi Benoit,

On 24/01/13 12:42, Benoit Cousson wrote:
> Hi Santosh,
> 
> On 01/23/2013 11:55 AM, Santosh Shilimkar wrote:
>> Looping Marc, Benoit
>>
>> On Wednesday 23 January 2013 04:06 PM, Mark Rutland wrote:
>>> On Tue, Jan 22, 2013 at 10:05:18PM +0000, Kukjin Kim wrote:
>>>> Mark Rutland wrote:
>>>>>
>>>> + devicetree-discuss, Grant Likely, Rob Herring and Tony Lindgren
>>>>
>>>>> On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
>>>>>> From: Thomas Abraham <thomas.ab@samsung.com>
>>>>>>
>>>>>> Need to be changed requirements in the 'cpus' node for exynos5440
>>>>>> to specify all the per-cpu interrupts of arch timer.
>>>>>
>>>>> The node(s) for the arch timer should not be in the cpus/cpu@N nodes.
>>>>> Instead, there should be one node (in the root of the tree).
>>>>>
>>>> Well, I don't think so. As per my understanding, the local timers are
>>>> attached to every ARM cores (cpus) and it generates certain interrupt
>>>> to the
>>>> GIC. So the correct representation for this in device tree is to
>>>> include the
>>>> interrupts in the cpu nodes in dts file. Your comments  refer to a
>>>> limitation in the Linux kernel implementation of the arch_timer and it
>>>> should not result in representing the hardware details incorrectly in
>>>> the
>>>> dts file.
>>>
>>> I disagree. The "correct representation" is whatever the devicetree
>>> binding
>>> documentation describes. It does not describe placing timer nodes in
>>> the cpu
>>> nodes.
>>>
>> This seems to be exact same topic what is getting discussed here [1]
>> Technically DT is suppose to represent how the hardware is rather than
>> how the bindings are done.
>>
>> But as Marc pointed out, the approach taken currently is to not
>> duplicate the banked information. The thread [1] isn't concluded
>> yet but looks like we might want to avoid duplicating the information
>> considering, more of such duplication needs to follow. e.g gic i/f
>>
>> Am still waiting on what Benoit has to say ?
> 
> I agree with you :-)
> 
> I'm not sure the binding was properly done to reflect the HW accurately.
> 
> A local timer for my point of view should be located in the cpu node
> like a L1 cache. Or at least referenced in each cpu by a phandle.
>
> What was the rational to put it in the root?

The rational was to follow what we already do for most (all?) banked
resources. We already have TWD, GIC and PMU that have a root node,
avoiding duplicated resources. I think consistency is an important thing
to have.

If we decide to move everything into CPU nodes and duplicate all the
banked resources, fine. But that has impacts that reach far beyond the
simple case of the timer.

In particular, good luck with the GIC distributor interface, where the
32 first interrupts are per CPU. This would also mandate a redesign of
the way we specify a PPI, as the CPU mask in the third field doesn't
mean a thing anymore.

If you insist on having a phandle to a timer node, fine by me.

Cheers,

	M.
-- 
Jazz is not dead. It just smells funny...

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

* [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
@ 2013-01-24 13:16               ` Marc Zyngier
  0 siblings, 0 replies; 22+ messages in thread
From: Marc Zyngier @ 2013-01-24 13:16 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Benoit,

On 24/01/13 12:42, Benoit Cousson wrote:
> Hi Santosh,
> 
> On 01/23/2013 11:55 AM, Santosh Shilimkar wrote:
>> Looping Marc, Benoit
>>
>> On Wednesday 23 January 2013 04:06 PM, Mark Rutland wrote:
>>> On Tue, Jan 22, 2013 at 10:05:18PM +0000, Kukjin Kim wrote:
>>>> Mark Rutland wrote:
>>>>>
>>>> + devicetree-discuss, Grant Likely, Rob Herring and Tony Lindgren
>>>>
>>>>> On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
>>>>>> From: Thomas Abraham <thomas.ab@samsung.com>
>>>>>>
>>>>>> Need to be changed requirements in the 'cpus' node for exynos5440
>>>>>> to specify all the per-cpu interrupts of arch timer.
>>>>>
>>>>> The node(s) for the arch timer should not be in the cpus/cpu at N nodes.
>>>>> Instead, there should be one node (in the root of the tree).
>>>>>
>>>> Well, I don't think so. As per my understanding, the local timers are
>>>> attached to every ARM cores (cpus) and it generates certain interrupt
>>>> to the
>>>> GIC. So the correct representation for this in device tree is to
>>>> include the
>>>> interrupts in the cpu nodes in dts file. Your comments  refer to a
>>>> limitation in the Linux kernel implementation of the arch_timer and it
>>>> should not result in representing the hardware details incorrectly in
>>>> the
>>>> dts file.
>>>
>>> I disagree. The "correct representation" is whatever the devicetree
>>> binding
>>> documentation describes. It does not describe placing timer nodes in
>>> the cpu
>>> nodes.
>>>
>> This seems to be exact same topic what is getting discussed here [1]
>> Technically DT is suppose to represent how the hardware is rather than
>> how the bindings are done.
>>
>> But as Marc pointed out, the approach taken currently is to not
>> duplicate the banked information. The thread [1] isn't concluded
>> yet but looks like we might want to avoid duplicating the information
>> considering, more of such duplication needs to follow. e.g gic i/f
>>
>> Am still waiting on what Benoit has to say ?
> 
> I agree with you :-)
> 
> I'm not sure the binding was properly done to reflect the HW accurately.
> 
> A local timer for my point of view should be located in the cpu node
> like a L1 cache. Or at least referenced in each cpu by a phandle.
>
> What was the rational to put it in the root?

The rational was to follow what we already do for most (all?) banked
resources. We already have TWD, GIC and PMU that have a root node,
avoiding duplicated resources. I think consistency is an important thing
to have.

If we decide to move everything into CPU nodes and duplicate all the
banked resources, fine. But that has impacts that reach far beyond the
simple case of the timer.

In particular, good luck with the GIC distributor interface, where the
32 first interrupts are per CPU. This would also mandate a redesign of
the way we specify a PPI, as the CPU mask in the third field doesn't
mean a thing anymore.

If you insist on having a phandle to a timer node, fine by me.

Cheers,

	M.
-- 
Jazz is not dead. It just smells funny...

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

* Re: [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
  2013-01-24 13:16               ` Marc Zyngier
@ 2013-01-30  7:20                 ` Santosh Shilimkar
  -1 siblings, 0 replies; 22+ messages in thread
From: Santosh Shilimkar @ 2013-01-30  7:20 UTC (permalink / raw)
  To: Benoit Cousson
  Cc: Marc Zyngier, Mark Rutland, Kukjin Kim, linux-samsung-soc,
	'Tony Lindgren',
	devicetree-discuss, rob.herring, Grant Likely,
	'Thomas Abraham',
	linux-arm-kernel

Benoit,

On Thursday 24 January 2013 06:46 PM, Marc Zyngier wrote:
> Hi Benoit,
>
> On 24/01/13 12:42, Benoit Cousson wrote:
>> Hi Santosh,
>>
>> On 01/23/2013 11:55 AM, Santosh Shilimkar wrote:
>>> Looping Marc, Benoit
>>>
>>> On Wednesday 23 January 2013 04:06 PM, Mark Rutland wrote:
>>>> On Tue, Jan 22, 2013 at 10:05:18PM +0000, Kukjin Kim wrote:
>>>>> Mark Rutland wrote:
>>>>>>
>>>>> + devicetree-discuss, Grant Likely, Rob Herring and Tony Lindgren
>>>>>
>>>>>> On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
>>>>>>> From: Thomas Abraham <thomas.ab@samsung.com>
>>>>>>>
>>>>>>> Need to be changed requirements in the 'cpus' node for exynos5440
>>>>>>> to specify all the per-cpu interrupts of arch timer.
>>>>>>
>>>>>> The node(s) for the arch timer should not be in the cpus/cpu@N nodes.
>>>>>> Instead, there should be one node (in the root of the tree).
>>>>>>
>>>>> Well, I don't think so. As per my understanding, the local timers are
>>>>> attached to every ARM cores (cpus) and it generates certain interrupt
>>>>> to the
>>>>> GIC. So the correct representation for this in device tree is to
>>>>> include the
>>>>> interrupts in the cpu nodes in dts file. Your comments  refer to a
>>>>> limitation in the Linux kernel implementation of the arch_timer and it
>>>>> should not result in representing the hardware details incorrectly in
>>>>> the
>>>>> dts file.
>>>>
>>>> I disagree. The "correct representation" is whatever the devicetree
>>>> binding
>>>> documentation describes. It does not describe placing timer nodes in
>>>> the cpu
>>>> nodes.
>>>>
>>> This seems to be exact same topic what is getting discussed here [1]
>>> Technically DT is suppose to represent how the hardware is rather than
>>> how the bindings are done.
>>>
>>> But as Marc pointed out, the approach taken currently is to not
>>> duplicate the banked information. The thread [1] isn't concluded
>>> yet but looks like we might want to avoid duplicating the information
>>> considering, more of such duplication needs to follow. e.g gic i/f
>>>
>>> Am still waiting on what Benoit has to say ?
>>
>> I agree with you :-)
>>
>> I'm not sure the binding was properly done to reflect the HW accurately.
>>
>> A local timer for my point of view should be located in the cpu node
>> like a L1 cache. Or at least referenced in each cpu by a phandle.
>>
>> What was the rational to put it in the root?
>
> The rational was to follow what we already do for most (all?) banked
> resources. We already have TWD, GIC and PMU that have a root node,
> avoiding duplicated resources. I think consistency is an important thing
> to have.
>
> If we decide to move everything into CPU nodes and duplicate all the
> banked resources, fine. But that has impacts that reach far beyond the
> simple case of the timer.
>
> In particular, good luck with the GIC distributor interface, where the
> 32 first interrupts are per CPU. This would also mandate a redesign of
> the way we specify a PPI, as the CPU mask in the third field doesn't
> mean a thing anymore.
>
> If you insist on having a phandle to a timer node, fine by me.
>
Can you please comment on it so that we can conclude this thread ?
I would like to update my patches and hence the push.

Regards,
Santosh

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

* [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
@ 2013-01-30  7:20                 ` Santosh Shilimkar
  0 siblings, 0 replies; 22+ messages in thread
From: Santosh Shilimkar @ 2013-01-30  7:20 UTC (permalink / raw)
  To: linux-arm-kernel

Benoit,

On Thursday 24 January 2013 06:46 PM, Marc Zyngier wrote:
> Hi Benoit,
>
> On 24/01/13 12:42, Benoit Cousson wrote:
>> Hi Santosh,
>>
>> On 01/23/2013 11:55 AM, Santosh Shilimkar wrote:
>>> Looping Marc, Benoit
>>>
>>> On Wednesday 23 January 2013 04:06 PM, Mark Rutland wrote:
>>>> On Tue, Jan 22, 2013 at 10:05:18PM +0000, Kukjin Kim wrote:
>>>>> Mark Rutland wrote:
>>>>>>
>>>>> + devicetree-discuss, Grant Likely, Rob Herring and Tony Lindgren
>>>>>
>>>>>> On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
>>>>>>> From: Thomas Abraham <thomas.ab@samsung.com>
>>>>>>>
>>>>>>> Need to be changed requirements in the 'cpus' node for exynos5440
>>>>>>> to specify all the per-cpu interrupts of arch timer.
>>>>>>
>>>>>> The node(s) for the arch timer should not be in the cpus/cpu at N nodes.
>>>>>> Instead, there should be one node (in the root of the tree).
>>>>>>
>>>>> Well, I don't think so. As per my understanding, the local timers are
>>>>> attached to every ARM cores (cpus) and it generates certain interrupt
>>>>> to the
>>>>> GIC. So the correct representation for this in device tree is to
>>>>> include the
>>>>> interrupts in the cpu nodes in dts file. Your comments  refer to a
>>>>> limitation in the Linux kernel implementation of the arch_timer and it
>>>>> should not result in representing the hardware details incorrectly in
>>>>> the
>>>>> dts file.
>>>>
>>>> I disagree. The "correct representation" is whatever the devicetree
>>>> binding
>>>> documentation describes. It does not describe placing timer nodes in
>>>> the cpu
>>>> nodes.
>>>>
>>> This seems to be exact same topic what is getting discussed here [1]
>>> Technically DT is suppose to represent how the hardware is rather than
>>> how the bindings are done.
>>>
>>> But as Marc pointed out, the approach taken currently is to not
>>> duplicate the banked information. The thread [1] isn't concluded
>>> yet but looks like we might want to avoid duplicating the information
>>> considering, more of such duplication needs to follow. e.g gic i/f
>>>
>>> Am still waiting on what Benoit has to say ?
>>
>> I agree with you :-)
>>
>> I'm not sure the binding was properly done to reflect the HW accurately.
>>
>> A local timer for my point of view should be located in the cpu node
>> like a L1 cache. Or at least referenced in each cpu by a phandle.
>>
>> What was the rational to put it in the root?
>
> The rational was to follow what we already do for most (all?) banked
> resources. We already have TWD, GIC and PMU that have a root node,
> avoiding duplicated resources. I think consistency is an important thing
> to have.
>
> If we decide to move everything into CPU nodes and duplicate all the
> banked resources, fine. But that has impacts that reach far beyond the
> simple case of the timer.
>
> In particular, good luck with the GIC distributor interface, where the
> 32 first interrupts are per CPU. This would also mandate a redesign of
> the way we specify a PPI, as the CPU mask in the third field doesn't
> mean a thing anymore.
>
> If you insist on having a phandle to a timer node, fine by me.
>
Can you please comment on it so that we can conclude this thread ?
I would like to update my patches and hence the push.

Regards,
Santosh

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

* RE: [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
  2013-01-30  7:20                 ` Santosh Shilimkar
@ 2013-02-04 22:25                   ` kgene at kernel.org
  -1 siblings, 0 replies; 22+ messages in thread
From: kgene @ 2013-02-04 22:25 UTC (permalink / raw)
  To: 'Santosh Shilimkar', 'Benoit Cousson'
  Cc: 'Marc Zyngier', 'Mark Rutland',
	linux-samsung-soc, 'Tony Lindgren',
	devicetree-discuss, rob.herring, 'Grant Likely',
	'Thomas Abraham',
	linux-arm-kernel

Santosh Shilimkar wrote:
> 
> Benoit,
> 
> On Thursday 24 January 2013 06:46 PM, Marc Zyngier wrote:
> > Hi Benoit,
> >
> > On 24/01/13 12:42, Benoit Cousson wrote:
> >> Hi Santosh,
> >>
> >> On 01/23/2013 11:55 AM, Santosh Shilimkar wrote:
> >>> Looping Marc, Benoit
> >>>
> >>> On Wednesday 23 January 2013 04:06 PM, Mark Rutland wrote:
> >>>> On Tue, Jan 22, 2013 at 10:05:18PM +0000, Kukjin Kim wrote:
> >>>>> Mark Rutland wrote:
> >>>>>>
> >>>>> + devicetree-discuss, Grant Likely, Rob Herring and Tony Lindgren
> >>>>>
> >>>>>> On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
> >>>>>>> From: Thomas Abraham <thomas.ab@samsung.com>
> >>>>>>>
> >>>>>>> Need to be changed requirements in the 'cpus' node for
> exynos5440
> >>>>>>> to specify all the per-cpu interrupts of arch timer.
> >>>>>>
> >>>>>> The node(s) for the arch timer should not be in the cpus/cpu@N
> nodes.
> >>>>>> Instead, there should be one node (in the root of the tree).
> >>>>>>
> >>>>> Well, I don't think so. As per my understanding, the local timers
are
> >>>>> attached to every ARM cores (cpus) and it generates certain
interrupt
> >>>>> to the
> >>>>> GIC. So the correct representation for this in device tree is to
> >>>>> include the
> >>>>> interrupts in the cpu nodes in dts file. Your comments  refer to a
> >>>>> limitation in the Linux kernel implementation of the arch_timer and
it
> >>>>> should not result in representing the hardware details incorrectly
in
> >>>>> the
> >>>>> dts file.
> >>>>
> >>>> I disagree. The "correct representation" is whatever the devicetree
> >>>> binding
> >>>> documentation describes. It does not describe placing timer nodes in
> >>>> the cpu
> >>>> nodes.
> >>>>
> >>> This seems to be exact same topic what is getting discussed here [1]
> >>> Technically DT is suppose to represent how the hardware is rather than
> >>> how the bindings are done.
> >>>
> >>> But as Marc pointed out, the approach taken currently is to not
> >>> duplicate the banked information. The thread [1] isn't concluded
> >>> yet but looks like we might want to avoid duplicating the information
> >>> considering, more of such duplication needs to follow. e.g gic i/f
> >>>
> >>> Am still waiting on what Benoit has to say ?
> >>
> >> I agree with you :-)
> >>
> >> I'm not sure the binding was properly done to reflect the HW
accurately.
> >>
> >> A local timer for my point of view should be located in the cpu node
> >> like a L1 cache. Or at least referenced in each cpu by a phandle.
> >>
> >> What was the rational to put it in the root?
> >
> > The rational was to follow what we already do for most (all?) banked
> > resources. We already have TWD, GIC and PMU that have a root node,
> > avoiding duplicated resources. I think consistency is an important thing
> > to have.
> >
> > If we decide to move everything into CPU nodes and duplicate all the
> > banked resources, fine. But that has impacts that reach far beyond the
> > simple case of the timer.
> >
> > In particular, good luck with the GIC distributor interface, where the
> > 32 first interrupts are per CPU. This would also mandate a redesign of
> > the way we specify a PPI, as the CPU mask in the third field doesn't
> > mean a thing anymore.
> >
> > If you insist on having a phandle to a timer node, fine by me.
> >
> Can you please comment on it so that we can conclude this thread ?
> I would like to update my patches and hence the push.
> 
Hmm...it's time to decide for now.

Let me add timer node for ARM arch timer at this moment. Then if any change
is required, will do it later.

If any objection, let me know. If not, I will queue following patch for
v3.9.

Thanks.

- Kukjin

---------8<------------------------------8<---------------------------------
-

From: Kukjin Kim <kgene.kim@samsung.com>
Subject: [PATCH] ARM: dts: re-organized cpu node for exynos5440

This patch adds timer node and re-organizes cpu node for exynos5440.

Acked-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/boot/dts/exynos5440.dtsi |   37
+++++++++++++++++--------------------
 1 file changed, 17 insertions(+), 20 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5440.dtsi
b/arch/arm/boot/dts/exynos5440.dtsi
index 1e7a2b0..5c5a699 100644
--- a/arch/arm/boot/dts/exynos5440.dtsi
+++ b/arch/arm/boot/dts/exynos5440.dtsi
@@ -24,40 +24,37 @@
 	};
 
 	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
 		cpu@0 {
 			compatible = "arm,cortex-a15";
-			timer {
-				compatible = "arm,armv7-timer";
-				interrupts = <1 13 0xf08>;
-				clock-frequency = <1000000>;
-			};
+			reg = <0>;
 		};
 		cpu@1 {
 			compatible = "arm,cortex-a15";
-			timer {
-				compatible = "arm,armv7-timer";
-				interrupts = <1 14 0xf08>;
-				clock-frequency = <1000000>;
-			};
+			reg = <1>;
 		};
 		cpu@2 {
 			compatible = "arm,cortex-a15";
-			timer {
-				compatible = "arm,armv7-timer";
-				interrupts = <1 14 0xf08>;
-				clock-frequency = <1000000>;
-			};
+			reg = <2>;
 		};
 		cpu@3 {
 			compatible = "arm,cortex-a15";
-			timer {
-				compatible = "arm,armv7-timer";
-				interrupts = <1 14 0xf08>;
-				clock-frequency = <1000000>;
-			};
+			reg = <3>;
 		};
 	};
 
+	timer {
+		compatible = "arm,cortex-a15-timer",
+			     "arm,armv7-timer";
+		interrupts = <1 13 0xf08>,
+			     <1 14 0xf08>,
+			     <1 11 0xf08>,
+			     <1 10 0xf08>;
+		clock-frequency = <50000000>;
+	};
+
 	serial@B0000 {
 		compatible = "samsung,exynos4210-uart";
 		reg = <0xB0000 0x1000>;
-- 
1.7.10.4

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

* [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440
@ 2013-02-04 22:25                   ` kgene at kernel.org
  0 siblings, 0 replies; 22+ messages in thread
From: kgene at kernel.org @ 2013-02-04 22:25 UTC (permalink / raw)
  To: linux-arm-kernel

Santosh Shilimkar wrote:
> 
> Benoit,
> 
> On Thursday 24 January 2013 06:46 PM, Marc Zyngier wrote:
> > Hi Benoit,
> >
> > On 24/01/13 12:42, Benoit Cousson wrote:
> >> Hi Santosh,
> >>
> >> On 01/23/2013 11:55 AM, Santosh Shilimkar wrote:
> >>> Looping Marc, Benoit
> >>>
> >>> On Wednesday 23 January 2013 04:06 PM, Mark Rutland wrote:
> >>>> On Tue, Jan 22, 2013 at 10:05:18PM +0000, Kukjin Kim wrote:
> >>>>> Mark Rutland wrote:
> >>>>>>
> >>>>> + devicetree-discuss, Grant Likely, Rob Herring and Tony Lindgren
> >>>>>
> >>>>>> On Tue, Jan 22, 2013 at 01:41:27AM +0000, Kukjin Kim wrote:
> >>>>>>> From: Thomas Abraham <thomas.ab@samsung.com>
> >>>>>>>
> >>>>>>> Need to be changed requirements in the 'cpus' node for
> exynos5440
> >>>>>>> to specify all the per-cpu interrupts of arch timer.
> >>>>>>
> >>>>>> The node(s) for the arch timer should not be in the cpus/cpu at N
> nodes.
> >>>>>> Instead, there should be one node (in the root of the tree).
> >>>>>>
> >>>>> Well, I don't think so. As per my understanding, the local timers
are
> >>>>> attached to every ARM cores (cpus) and it generates certain
interrupt
> >>>>> to the
> >>>>> GIC. So the correct representation for this in device tree is to
> >>>>> include the
> >>>>> interrupts in the cpu nodes in dts file. Your comments  refer to a
> >>>>> limitation in the Linux kernel implementation of the arch_timer and
it
> >>>>> should not result in representing the hardware details incorrectly
in
> >>>>> the
> >>>>> dts file.
> >>>>
> >>>> I disagree. The "correct representation" is whatever the devicetree
> >>>> binding
> >>>> documentation describes. It does not describe placing timer nodes in
> >>>> the cpu
> >>>> nodes.
> >>>>
> >>> This seems to be exact same topic what is getting discussed here [1]
> >>> Technically DT is suppose to represent how the hardware is rather than
> >>> how the bindings are done.
> >>>
> >>> But as Marc pointed out, the approach taken currently is to not
> >>> duplicate the banked information. The thread [1] isn't concluded
> >>> yet but looks like we might want to avoid duplicating the information
> >>> considering, more of such duplication needs to follow. e.g gic i/f
> >>>
> >>> Am still waiting on what Benoit has to say ?
> >>
> >> I agree with you :-)
> >>
> >> I'm not sure the binding was properly done to reflect the HW
accurately.
> >>
> >> A local timer for my point of view should be located in the cpu node
> >> like a L1 cache. Or at least referenced in each cpu by a phandle.
> >>
> >> What was the rational to put it in the root?
> >
> > The rational was to follow what we already do for most (all?) banked
> > resources. We already have TWD, GIC and PMU that have a root node,
> > avoiding duplicated resources. I think consistency is an important thing
> > to have.
> >
> > If we decide to move everything into CPU nodes and duplicate all the
> > banked resources, fine. But that has impacts that reach far beyond the
> > simple case of the timer.
> >
> > In particular, good luck with the GIC distributor interface, where the
> > 32 first interrupts are per CPU. This would also mandate a redesign of
> > the way we specify a PPI, as the CPU mask in the third field doesn't
> > mean a thing anymore.
> >
> > If you insist on having a phandle to a timer node, fine by me.
> >
> Can you please comment on it so that we can conclude this thread ?
> I would like to update my patches and hence the push.
> 
Hmm...it's time to decide for now.

Let me add timer node for ARM arch timer at this moment. Then if any change
is required, will do it later.

If any objection, let me know. If not, I will queue following patch for
v3.9.

Thanks.

- Kukjin

---------8<------------------------------8<---------------------------------
-

From: Kukjin Kim <kgene.kim@samsung.com>
Subject: [PATCH] ARM: dts: re-organized cpu node for exynos5440

This patch adds timer node and re-organizes cpu node for exynos5440.

Acked-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/boot/dts/exynos5440.dtsi |   37
+++++++++++++++++--------------------
 1 file changed, 17 insertions(+), 20 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5440.dtsi
b/arch/arm/boot/dts/exynos5440.dtsi
index 1e7a2b0..5c5a699 100644
--- a/arch/arm/boot/dts/exynos5440.dtsi
+++ b/arch/arm/boot/dts/exynos5440.dtsi
@@ -24,40 +24,37 @@
 	};
 
 	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
 		cpu at 0 {
 			compatible = "arm,cortex-a15";
-			timer {
-				compatible = "arm,armv7-timer";
-				interrupts = <1 13 0xf08>;
-				clock-frequency = <1000000>;
-			};
+			reg = <0>;
 		};
 		cpu at 1 {
 			compatible = "arm,cortex-a15";
-			timer {
-				compatible = "arm,armv7-timer";
-				interrupts = <1 14 0xf08>;
-				clock-frequency = <1000000>;
-			};
+			reg = <1>;
 		};
 		cpu at 2 {
 			compatible = "arm,cortex-a15";
-			timer {
-				compatible = "arm,armv7-timer";
-				interrupts = <1 14 0xf08>;
-				clock-frequency = <1000000>;
-			};
+			reg = <2>;
 		};
 		cpu at 3 {
 			compatible = "arm,cortex-a15";
-			timer {
-				compatible = "arm,armv7-timer";
-				interrupts = <1 14 0xf08>;
-				clock-frequency = <1000000>;
-			};
+			reg = <3>;
 		};
 	};
 
+	timer {
+		compatible = "arm,cortex-a15-timer",
+			     "arm,armv7-timer";
+		interrupts = <1 13 0xf08>,
+			     <1 14 0xf08>,
+			     <1 11 0xf08>,
+			     <1 10 0xf08>;
+		clock-frequency = <50000000>;
+	};
+
 	serial at B0000 {
 		compatible = "samsung,exynos4210-uart";
 		reg = <0xB0000 0x1000>;
-- 
1.7.10.4

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

end of thread, other threads:[~2013-02-04 22:25 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-22  1:41 [PATCH] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440 Kukjin Kim
2013-01-22  1:41 ` Kukjin Kim
2013-01-22 10:15 ` Mark Rutland
2013-01-22 10:15   ` Mark Rutland
2013-01-22 22:05   ` Kukjin Kim
2013-01-22 22:05     ` Kukjin Kim
2013-01-23 10:36     ` Mark Rutland
2013-01-23 10:36       ` Mark Rutland
2013-01-23 10:55       ` Santosh Shilimkar
2013-01-23 10:55         ` Santosh Shilimkar
     [not found]         ` <50FFC1B0.8000601-l0cyMroinI0@public.gmane.org>
2013-01-24 12:42           ` Benoit Cousson
2013-01-24 12:42             ` Benoit Cousson
     [not found]             ` <51012C4B.5080300-l0cyMroinI0@public.gmane.org>
2013-01-24 12:53               ` Santosh Shilimkar
2013-01-24 12:53                 ` Santosh Shilimkar
2013-01-24 13:16             ` Marc Zyngier
2013-01-24 13:16               ` Marc Zyngier
2013-01-30  7:20               ` Santosh Shilimkar
2013-01-30  7:20                 ` Santosh Shilimkar
2013-02-04 22:25                 ` kgene
2013-02-04 22:25                   ` kgene at kernel.org
2013-01-23 13:55       ` Rob Herring
2013-01-23 13:55         ` Rob Herring

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.