linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Add generic Cortex-A9 timer for Armada 38x
@ 2017-08-01 16:36 Marcin Wojtas
  2017-08-01 16:36 ` [PATCH 1/2] ARM: mvebu: enable ARM_GLOBAL_TIMER compilation Armada 38x platforms Marcin Wojtas
  2017-08-01 16:36 ` [PATCH 2/2] ARM: dts: armada-38x: Add arm_global_timer node Marcin Wojtas
  0 siblings, 2 replies; 5+ messages in thread
From: Marcin Wojtas @ 2017-08-01 16:36 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel
  Cc: sebastian.hesselbarth, andrew, linux, jason, thomas.petazzoni,
	gregory.clement, will.deacon, robh+dt, mark.rutland, jaz, cognet,
	Marcin Wojtas

Hi,

This small patchset adds usage of generic Cortex-A9 timer driver
by Armada 38x SoCs. The system clocksource subsystem
will pick one of above two available ones (ARM generic or legacy
axp/a370 timer). Test on v4.13-rc3 showed, that the generic one
is chosen - no regression whatsoever observed on A388-GP and
A388-Clearfog. Backward compatibility with older kernels/DT
is preserved.

I'm looking forward to any comments or remarks.

Best regards,
Marcin

Marcin Wojtas (2):
  ARM: mvebu: enable ARM_GLOBAL_TIMER compilation Armada 38x platforms
  ARM: dts: armada-38x: Add arm_global_timer node

 arch/arm/boot/dts/armada-38x.dtsi | 7 +++++++
 arch/arm/mach-mvebu/Kconfig       | 2 ++
 2 files changed, 9 insertions(+)

-- 
1.8.3.1

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

* [PATCH 1/2] ARM: mvebu: enable ARM_GLOBAL_TIMER compilation Armada 38x platforms
  2017-08-01 16:36 [PATCH 0/2] Add generic Cortex-A9 timer for Armada 38x Marcin Wojtas
@ 2017-08-01 16:36 ` Marcin Wojtas
  2017-08-03 13:17   ` Gregory CLEMENT
  2017-08-01 16:36 ` [PATCH 2/2] ARM: dts: armada-38x: Add arm_global_timer node Marcin Wojtas
  1 sibling, 1 reply; 5+ messages in thread
From: Marcin Wojtas @ 2017-08-01 16:36 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel
  Cc: sebastian.hesselbarth, andrew, linux, jason, thomas.petazzoni,
	gregory.clement, will.deacon, robh+dt, mark.rutland, jaz, cognet,
	Marcin Wojtas

Armada 38x SoCs along with legacy timer (time-armada-370-xp.c),
comprise generic Cortex-A9 global timer (arm_global_timer.c).
Enable its compilation. The system clocksource subsystem
will pick one of above two available ones in case the global
timer node is present in the device tree.

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
 arch/arm/mach-mvebu/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 541647f..9b49867 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -60,6 +60,8 @@ config MACH_ARMADA_38X
 	select ARM_ERRATA_720789
 	select ARM_ERRATA_753970
 	select ARM_GIC
+	select ARM_GLOBAL_TIMER
+	select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
 	select ARMADA_370_XP_IRQ
 	select ARMADA_38X_CLK
 	select HAVE_ARM_SCU
-- 
1.8.3.1

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

* [PATCH 2/2] ARM: dts: armada-38x: Add arm_global_timer node
  2017-08-01 16:36 [PATCH 0/2] Add generic Cortex-A9 timer for Armada 38x Marcin Wojtas
  2017-08-01 16:36 ` [PATCH 1/2] ARM: mvebu: enable ARM_GLOBAL_TIMER compilation Armada 38x platforms Marcin Wojtas
@ 2017-08-01 16:36 ` Marcin Wojtas
  2017-08-03 13:14   ` Gregory CLEMENT
  1 sibling, 1 reply; 5+ messages in thread
From: Marcin Wojtas @ 2017-08-01 16:36 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel
  Cc: sebastian.hesselbarth, andrew, linux, jason, thomas.petazzoni,
	gregory.clement, will.deacon, robh+dt, mark.rutland, jaz, cognet,
	Marcin Wojtas

Since generic Cortex-A9 global timer is available after adding
it to compilation, enable its node in armada-38x.dtsi.

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
 arch/arm/boot/dts/armada-38x.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
index af31f5d..7ff0811e 100644
--- a/arch/arm/boot/dts/armada-38x.dtsi
+++ b/arch/arm/boot/dts/armada-38x.dtsi
@@ -154,6 +154,13 @@
 				reg = <0xc000 0x58>;
 			};
 
+			timer@c200 {
+				compatible = "arm,cortex-a9-global-timer";
+				reg = <0xc200 0x20>;
+				interrupts = <GIC_PPI 11 (IRQ_TYPE_EDGE_RISING | GIC_CPU_MASK_SIMPLE(2))>;
+				clocks = <&coreclk 2>;
+			};
+
 			timer@c600 {
 				compatible = "arm,cortex-a9-twd-timer";
 				reg = <0xc600 0x20>;
-- 
1.8.3.1

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

* Re: [PATCH 2/2] ARM: dts: armada-38x: Add arm_global_timer node
  2017-08-01 16:36 ` [PATCH 2/2] ARM: dts: armada-38x: Add arm_global_timer node Marcin Wojtas
@ 2017-08-03 13:14   ` Gregory CLEMENT
  0 siblings, 0 replies; 5+ messages in thread
From: Gregory CLEMENT @ 2017-08-03 13:14 UTC (permalink / raw)
  To: Marcin Wojtas
  Cc: linux-kernel, linux-arm-kernel, sebastian.hesselbarth, andrew,
	linux, jason, thomas.petazzoni, will.deacon, robh+dt,
	mark.rutland, jaz, cognet

Hi Marcin,
 
 On mar., août 01 2017, Marcin Wojtas <mw@semihalf.com> wrote:

> Since generic Cortex-A9 global timer is available after adding
> it to compilation, enable its node in armada-38x.dtsi.
>
> Signed-off-by: Marcin Wojtas <mw@semihalf.com>

Applied on mvebu/dt

Thanks,

Gregory

> ---
>  arch/arm/boot/dts/armada-38x.dtsi | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
> index af31f5d..7ff0811e 100644
> --- a/arch/arm/boot/dts/armada-38x.dtsi
> +++ b/arch/arm/boot/dts/armada-38x.dtsi
> @@ -154,6 +154,13 @@
>  				reg = <0xc000 0x58>;
>  			};
>  
> +			timer@c200 {
> +				compatible = "arm,cortex-a9-global-timer";
> +				reg = <0xc200 0x20>;
> +				interrupts = <GIC_PPI 11 (IRQ_TYPE_EDGE_RISING | GIC_CPU_MASK_SIMPLE(2))>;
> +				clocks = <&coreclk 2>;
> +			};
> +
>  			timer@c600 {
>  				compatible = "arm,cortex-a9-twd-timer";
>  				reg = <0xc600 0x20>;
> -- 
> 1.8.3.1
>

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: [PATCH 1/2] ARM: mvebu: enable ARM_GLOBAL_TIMER compilation Armada 38x platforms
  2017-08-01 16:36 ` [PATCH 1/2] ARM: mvebu: enable ARM_GLOBAL_TIMER compilation Armada 38x platforms Marcin Wojtas
@ 2017-08-03 13:17   ` Gregory CLEMENT
  0 siblings, 0 replies; 5+ messages in thread
From: Gregory CLEMENT @ 2017-08-03 13:17 UTC (permalink / raw)
  To: Marcin Wojtas
  Cc: linux-kernel, linux-arm-kernel, sebastian.hesselbarth, andrew,
	linux, jason, thomas.petazzoni, will.deacon, robh+dt,
	mark.rutland, jaz, cognet

Hi Marcin,
 
 On mar., août 01 2017, Marcin Wojtas <mw@semihalf.com> wrote:

> Armada 38x SoCs along with legacy timer (time-armada-370-xp.c),
> comprise generic Cortex-A9 global timer (arm_global_timer.c).
> Enable its compilation. The system clocksource subsystem
> will pick one of above two available ones in case the global
> timer node is present in the device tree.
>
> Signed-off-by: Marcin Wojtas <mw@semihalf.com>

Applied on mvebu/soc

Thanks,

Gregory

> ---
>  arch/arm/mach-mvebu/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
> index 541647f..9b49867 100644
> --- a/arch/arm/mach-mvebu/Kconfig
> +++ b/arch/arm/mach-mvebu/Kconfig
> @@ -60,6 +60,8 @@ config MACH_ARMADA_38X
>  	select ARM_ERRATA_720789
>  	select ARM_ERRATA_753970
>  	select ARM_GIC
> +	select ARM_GLOBAL_TIMER
> +	select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
>  	select ARMADA_370_XP_IRQ
>  	select ARMADA_38X_CLK
>  	select HAVE_ARM_SCU
> -- 
> 1.8.3.1
>

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

end of thread, other threads:[~2017-08-03 13:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-01 16:36 [PATCH 0/2] Add generic Cortex-A9 timer for Armada 38x Marcin Wojtas
2017-08-01 16:36 ` [PATCH 1/2] ARM: mvebu: enable ARM_GLOBAL_TIMER compilation Armada 38x platforms Marcin Wojtas
2017-08-03 13:17   ` Gregory CLEMENT
2017-08-01 16:36 ` [PATCH 2/2] ARM: dts: armada-38x: Add arm_global_timer node Marcin Wojtas
2017-08-03 13:14   ` Gregory CLEMENT

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