linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: matthew.leach@arm.com (Matthew Leach)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] clocksource: arm_global_timer: Only check for unusable timer on A9
Date: Mon, 10 Mar 2014 11:51:31 +0000	[thread overview]
Message-ID: <1394452294-24552-2-git-send-email-matthew.leach@arm.com> (raw)
In-Reply-To: <1394452294-24552-1-git-send-email-matthew.leach@arm.com>

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

  reply	other threads:[~2014-03-10 11:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-10 11:51 [PATCH 0/4] Add support for the Cortex A5 global timer Matthew Leach
2014-03-10 11:51 ` Matthew Leach [this message]
2014-03-10 11:51 ` [PATCH 2/4] documentaion: DT: allow a A5 compatible string in " Matthew Leach
2014-03-10 11:57   ` Mark Rutland
2014-03-10 16:27   ` Rob Herring
2014-03-10 16:51     ` Mark Rutland
2014-03-10 17:57       ` Rob Herring
2014-03-10 18:11         ` Mark Rutland
2014-03-10 16:28   ` Rob Herring
2014-03-10 11:51 ` [PATCH 3/4] dts: ca5: add the global timer for the A5 Matthew Leach
2014-03-10 11:51 ` [PATCH 4/4] KConfig: Vexpress: build the ARM_GLOBAL_TIMER with vexpress platform Matthew Leach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1394452294-24552-2-git-send-email-matthew.leach@arm.com \
    --to=matthew.leach@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).