summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2013-03-25 19:41:39 +0800
committerShawn Guo <shawn.guo@linaro.org>2013-04-01 16:30:02 +0800
commit220d2f269ab017c139bbce2cb41f3bd1b1ddcffa (patch)
tree40e5b52bea4bcbd10eaa5ea151223dcdb349ee0e
parentbe35bd2bcd4fc5d67a24ad134138e606f69d11a4 (diff)
downloadlinux-stable-220d2f269ab017c139bbce2cb41f3bd1b1ddcffa.tar.gz
linux-stable-220d2f269ab017c139bbce2cb41f3bd1b1ddcffa.tar.bz2
linux-stable-220d2f269ab017c139bbce2cb41f3bd1b1ddcffa.zip
ARM: mxs: remove cpu_is_mx23() call from timer code
Remove cpu_is_mx23() call from timer code by using of_device_is_compatible() instead. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
-rw-r--r--arch/arm/mach-mxs/timer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-mxs/timer.c b/arch/arm/mach-mxs/timer.c
index c8cda1834655..f4dd96ff081a 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;