summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/arm_global_timer.c
diff options
context:
space:
mode:
authorMatthew Leach <matthew.leach@arm.com>2014-03-14 11:18:19 +0100
committerDaniel Lezcano <daniel.lezcano@linaro.org>2014-04-22 11:44:24 +0200
commit2cf2ff9f1fcdca404885bc55292b2046eabc039a (patch)
tree5735f181a7751ab76f5e6b46b8c969efc7c2c2f6 /drivers/clocksource/arm_global_timer.c
parentLinux 3.15-rc2 (diff)
downloadlinux-2cf2ff9f1fcdca404885bc55292b2046eabc039a.tar.xz
linux-2cf2ff9f1fcdca404885bc55292b2046eabc039a.zip
clocksource: arm_global_timer: Only check for unusable timer on A9
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> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/clocksource/arm_global_timer.c')
-rw-r--r--drivers/clocksource/arm_global_timer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/clocksource/arm_global_timer.c b/drivers/clocksource/arm_global_timer.c
index 0fc31d029e52..60e5a170c4d2 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;
}