linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: shawn.guo@linaro.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/6] ARM: mxs: remove cpu_is_mx23() call from timer code
Date: Mon, 25 Mar 2013 23:17:30 +0800	[thread overview]
Message-ID: <1364224652-28332-5-git-send-email-shawn.guo@linaro.org> (raw)
In-Reply-To: <1364224652-28332-1-git-send-email-shawn.guo@linaro.org>

Remove cpu_is_mx23() call from timer code by using
of_device_is_compatible() instead.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 arch/arm/mach-mxs/timer.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-mxs/timer.c b/arch/arm/mach-mxs/timer.c
index c8cda18..f4dd96ff 100644
--- a/arch/arm/mach-mxs/timer.c
+++ b/arch/arm/mach-mxs/timer.c
@@ -266,7 +266,8 @@ static void __init mxs_timer_init(struct device_node *np)
 
 	/* get timrot version */
 	timrot_major_version = __raw_readl(mxs_timrot_base +
-				(cpu_is_mx23() ? MX23_TIMROT_VERSION_OFFSET :
+			(of_device_is_compatible(np, "fsl,imx23-timrot") ?
+						MX23_TIMROT_VERSION_OFFSET :
 						MX28_TIMROT_VERSION_OFFSET));
 	timrot_major_version >>= BP_TIMROT_MAJOR_VERSION;
 
-- 
1.7.9.5

  parent reply	other threads:[~2013-03-25 15:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-25 15:17 [PATCH 0/6] ARM: mxs: timer code cleanup Shawn Guo
2013-03-25 15:17 ` [PATCH 1/6] ARM: mxs: use CLKSRC_OF helper to initialize timer Shawn Guo
2013-03-25 15:17 ` [PATCH 2/6] ARM: mxs: look up timrot clock from device tree Shawn Guo
2013-07-11 10:56   ` Uwe Kleine-König
2013-07-11 13:57     ` Shawn Guo
2013-03-25 15:17 ` [PATCH 3/6] ARM: mxs: get timrot base address " Shawn Guo
2013-03-25 15:17 ` Shawn Guo [this message]
2013-03-25 15:17 ` [PATCH 5/6] ARM: mxs: select STMP_DEVICE and use it for timer code Shawn Guo
2013-03-25 15:17 ` [PATCH 6/6] ARM: mxs: move timer driver into drivers/clocksource Shawn Guo

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=1364224652-28332-5-git-send-email-shawn.guo@linaro.org \
    --to=shawn.guo@linaro.org \
    --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).