* [PATCH v2 0/4] Add support for the Cortex A5 global timer
@ 2014-03-14 10:18 Matthew Leach
2014-03-14 10:18 ` [PATCH v2 1/4] clocksource: arm_global_timer: Only check for unusable timer on A9 Matthew Leach
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Matthew Leach @ 2014-03-14 10:18 UTC (permalink / raw)
To: linux-arm-kernel
This patch series adds support for the global timer with the Cortex
A5. This is relatively simple patch series and mainly consists of:
- Update a check in the drive probe code for an unusable global timer
to be non-specific to the A9.
- Add the appropriate device tree node and Kconfig options.
- Add a compatible node for the specific A5 global timer in the DT
binding.
Changes since v1
================
- Retain information in the DT binding documentation that the driver
will only work on a A9 r0p2 and above.
Any comments welcome.
Matt
Matthew Leach (4):
clocksource: arm_global_timer: Only check for unusable timer on A9
documentaion: DT: allow a A5 compatible string in global timer
dts: ca5: add the global timer for the A5
KConfig: Vexpress: build the ARM_GLOBAL_TIMER with vexpress platform
Documentation/devicetree/bindings/arm/global_timer.txt | 7 +++++--
arch/arm/boot/dts/vexpress-v2p-ca5s.dts | 10 +++++++++-
arch/arm/mach-vexpress/Kconfig | 1 +
drivers/clocksource/arm_global_timer.c | 5 +++--
4 files changed, 18 insertions(+), 5 deletions(-)
--
1.8.5.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/4] clocksource: arm_global_timer: Only check for unusable timer on A9
2014-03-14 10:18 [PATCH v2 0/4] Add support for the Cortex A5 global timer Matthew Leach
@ 2014-03-14 10:18 ` Matthew Leach
2014-04-15 16:51 ` Daniel Lezcano
2014-03-14 10:18 ` [PATCH v2 2/4] documentaion: DT: allow a A5 compatible string in global timer Matthew Leach
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Matthew Leach @ 2014-03-14 10:18 UTC (permalink / raw)
To: linux-arm-kernel
The check for a usable global timer in the probe code does not enquire
which CPU we are currently running on. This can cause the driver to
incorrectly assume we have an unusable global timer if we are running
on a CPU other than A9.
Before checking the CPU revision, ensure we are running on an A9 CPU.
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Matthew Leach <matthew.leach@arm.com>
---
drivers/clocksource/arm_global_timer.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/clocksource/arm_global_timer.c b/drivers/clocksource/arm_global_timer.c
index 0fc31d0..60e5a170 100644
--- a/drivers/clocksource/arm_global_timer.c
+++ b/drivers/clocksource/arm_global_timer.c
@@ -246,11 +246,12 @@ static void __init global_timer_of_register(struct device_node *np)
int err = 0;
/*
- * In r2p0 the comparators for each processor with the global timer
+ * In A9 r2p0 the comparators for each processor with the global timer
* fire when the timer value is greater than or equal to. In previous
* revisions the comparators fired when the timer value was equal to.
*/
- if ((read_cpuid_id() & 0xf0000f) < 0x200000) {
+ if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9
+ && (read_cpuid_id() & 0xf0000f) < 0x200000) {
pr_warn("global-timer: non support for this cpu version.\n");
return;
}
--
1.8.5.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/4] documentaion: DT: allow a A5 compatible string in global timer
2014-03-14 10:18 [PATCH v2 0/4] Add support for the Cortex A5 global timer Matthew Leach
2014-03-14 10:18 ` [PATCH v2 1/4] clocksource: arm_global_timer: Only check for unusable timer on A9 Matthew Leach
@ 2014-03-14 10:18 ` Matthew Leach
2014-03-14 16:32 ` Rob Herring
2014-03-14 10:18 ` [PATCH v2 3/4] dts: ca5: add the global timer for the A5 Matthew Leach
2014-03-14 10:18 ` [PATCH v2 4/4] KConfig: Vexpress: build the ARM_GLOBAL_TIMER with vexpress platform Matthew Leach
3 siblings, 1 reply; 7+ messages in thread
From: Matthew Leach @ 2014-03-14 10:18 UTC (permalink / raw)
To: linux-arm-kernel
The global timer is present on the Cortex A5. Add a compatibility
string to the DT binding to allow a Cortex A5 global timer.
Signed-off-by: Matthew Leach <matthew.leach@arm.com>
---
Documentation/devicetree/bindings/arm/global_timer.txt | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/arm/global_timer.txt b/Documentation/devicetree/bindings/arm/global_timer.txt
index 1e54898..bdae3a8 100644
--- a/Documentation/devicetree/bindings/arm/global_timer.txt
+++ b/Documentation/devicetree/bindings/arm/global_timer.txt
@@ -4,8 +4,11 @@
** Timer node required properties:
-- compatible : Should be "arm,cortex-a9-global-timer"
- Driver supports versions r2p0 and above.
+- compatible : should contain
+ * "arm,cortex-a5-global-timer" for Cortex-A5 global timers.
+ * "arm,cortex-a9-global-timer" for Cortex-A9 global
+ timers or any compatible implementation. Note: driver
+ supports versions r2p0 and above.
- interrupts : One interrupt to each core
--
1.8.5.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 3/4] dts: ca5: add the global timer for the A5
2014-03-14 10:18 [PATCH v2 0/4] Add support for the Cortex A5 global timer Matthew Leach
2014-03-14 10:18 ` [PATCH v2 1/4] clocksource: arm_global_timer: Only check for unusable timer on A9 Matthew Leach
2014-03-14 10:18 ` [PATCH v2 2/4] documentaion: DT: allow a A5 compatible string in global timer Matthew Leach
@ 2014-03-14 10:18 ` Matthew Leach
2014-03-14 10:18 ` [PATCH v2 4/4] KConfig: Vexpress: build the ARM_GLOBAL_TIMER with vexpress platform Matthew Leach
3 siblings, 0 replies; 7+ messages in thread
From: Matthew Leach @ 2014-03-14 10:18 UTC (permalink / raw)
To: linux-arm-kernel
The Cortex A5 contains a global timer: add the appropriate device tree
node.
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Matthew Leach <matthew.leach@arm.com>
---
arch/arm/boot/dts/vexpress-v2p-ca5s.dts | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/vexpress-v2p-ca5s.dts b/arch/arm/boot/dts/vexpress-v2p-ca5s.dts
index c544a55..d2709b7 100644
--- a/arch/arm/boot/dts/vexpress-v2p-ca5s.dts
+++ b/arch/arm/boot/dts/vexpress-v2p-ca5s.dts
@@ -88,6 +88,14 @@
interrupts = <1 13 0x304>;
};
+ timer at 2c000200 {
+ compatible = "arm,cortex-a5-global-timer",
+ "arm,cortex-a9-global-timer";
+ reg = <0x2c000200 0x20>;
+ interrupts = <1 11 0x304>;
+ clocks = <&oscclk0>;
+ };
+
watchdog at 2c000620 {
compatible = "arm,cortex-a5-twd-wdt";
reg = <0x2c000620 0x20>;
@@ -120,7 +128,7 @@
compatible = "arm,vexpress,config-bus";
arm,vexpress,config-bridge = <&v2m_sysreg>;
- osc at 0 {
+ oscclk0: osc at 0 {
/* CPU and internal AXI reference clock */
compatible = "arm,vexpress-osc";
arm,vexpress-sysreg,func = <1 0>;
--
1.8.5.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 4/4] KConfig: Vexpress: build the ARM_GLOBAL_TIMER with vexpress platform
2014-03-14 10:18 [PATCH v2 0/4] Add support for the Cortex A5 global timer Matthew Leach
` (2 preceding siblings ...)
2014-03-14 10:18 ` [PATCH v2 3/4] dts: ca5: add the global timer for the A5 Matthew Leach
@ 2014-03-14 10:18 ` Matthew Leach
3 siblings, 0 replies; 7+ messages in thread
From: Matthew Leach @ 2014-03-14 10:18 UTC (permalink / raw)
To: linux-arm-kernel
The Cortex A5 now contains bindings for the global timer
driver. Ensure that the driver is built with a vexpress platform.
Signed-off-by: Matthew Leach <matthew.leach@arm.com>
---
arch/arm/mach-vexpress/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
index 4a70be4..4fb2a65 100644
--- a/arch/arm/mach-vexpress/Kconfig
+++ b/arch/arm/mach-vexpress/Kconfig
@@ -4,6 +4,7 @@ config ARCH_VEXPRESS
select ARCH_SUPPORTS_BIG_ENDIAN
select ARM_AMBA
select ARM_GIC
+ select ARM_GLOBAL_TIMER
select ARM_TIMER_SP804
select COMMON_CLK
select COMMON_CLK_VERSATILE
--
1.8.5.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/4] documentaion: DT: allow a A5 compatible string in global timer
2014-03-14 10:18 ` [PATCH v2 2/4] documentaion: DT: allow a A5 compatible string in global timer Matthew Leach
@ 2014-03-14 16:32 ` Rob Herring
0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2014-03-14 16:32 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Mar 14, 2014 at 5:18 AM, Matthew Leach <matthew.leach@arm.com> wrote:
> The global timer is present on the Cortex A5. Add a compatibility
> string to the DT binding to allow a Cortex A5 global timer.
>
> Signed-off-by: Matthew Leach <matthew.leach@arm.com>
Acked-by: Rob Herring <robh@kernel.org>
> ---
> Documentation/devicetree/bindings/arm/global_timer.txt | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/arm/global_timer.txt b/Documentation/devicetree/bindings/arm/global_timer.txt
> index 1e54898..bdae3a8 100644
> --- a/Documentation/devicetree/bindings/arm/global_timer.txt
> +++ b/Documentation/devicetree/bindings/arm/global_timer.txt
> @@ -4,8 +4,11 @@
>
> ** Timer node required properties:
>
> -- compatible : Should be "arm,cortex-a9-global-timer"
> - Driver supports versions r2p0 and above.
> +- compatible : should contain
> + * "arm,cortex-a5-global-timer" for Cortex-A5 global timers.
> + * "arm,cortex-a9-global-timer" for Cortex-A9 global
> + timers or any compatible implementation. Note: driver
> + supports versions r2p0 and above.
>
> - interrupts : One interrupt to each core
>
> --
> 1.8.5.3
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/4] clocksource: arm_global_timer: Only check for unusable timer on A9
2014-03-14 10:18 ` [PATCH v2 1/4] clocksource: arm_global_timer: Only check for unusable timer on A9 Matthew Leach
@ 2014-04-15 16:51 ` Daniel Lezcano
0 siblings, 0 replies; 7+ messages in thread
From: Daniel Lezcano @ 2014-04-15 16:51 UTC (permalink / raw)
To: linux-arm-kernel
On 03/14/2014 11:18 AM, Matthew Leach wrote:
> The check for a usable global timer in the probe code does not enquire
> which CPU we are currently running on. This can cause the driver to
> incorrectly assume we have an unusable global timer if we are running
> on a CPU other than A9.
>
> Before checking the CPU revision, ensure we are running on an A9 CPU.
>
> Acked-by: Will Deacon <will.deacon@arm.com>
> Signed-off-by: Matthew Leach <matthew.leach@arm.com>
> ---
> drivers/clocksource/arm_global_timer.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clocksource/arm_global_timer.c b/drivers/clocksource/arm_global_timer.c
> index 0fc31d0..60e5a170 100644
> --- a/drivers/clocksource/arm_global_timer.c
> +++ b/drivers/clocksource/arm_global_timer.c
> @@ -246,11 +246,12 @@ static void __init global_timer_of_register(struct device_node *np)
> int err = 0;
>
> /*
> - * In r2p0 the comparators for each processor with the global timer
> + * In A9 r2p0 the comparators for each processor with the global timer
> * fire when the timer value is greater than or equal to. In previous
> * revisions the comparators fired when the timer value was equal to.
> */
> - if ((read_cpuid_id() & 0xf0000f) < 0x200000) {
> + if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9
> + && (read_cpuid_id() & 0xf0000f) < 0x200000) {
> pr_warn("global-timer: non support for this cpu version.\n");
> return;
> }
Applied on my tree for 3.16
--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-04-15 16:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-14 10:18 [PATCH v2 0/4] Add support for the Cortex A5 global timer Matthew Leach
2014-03-14 10:18 ` [PATCH v2 1/4] clocksource: arm_global_timer: Only check for unusable timer on A9 Matthew Leach
2014-04-15 16:51 ` Daniel Lezcano
2014-03-14 10:18 ` [PATCH v2 2/4] documentaion: DT: allow a A5 compatible string in global timer Matthew Leach
2014-03-14 16:32 ` Rob Herring
2014-03-14 10:18 ` [PATCH v2 3/4] dts: ca5: add the global timer for the A5 Matthew Leach
2014-03-14 10:18 ` [PATCH v2 4/4] KConfig: Vexpress: build the ARM_GLOBAL_TIMER with vexpress platform Matthew Leach
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.