ARM: mxs: remove cpu_is_mx23() call from timer code
authorShawn Guo <shawn.guo@linaro.org>
Mon, 25 Mar 2013 11:41:39 +0000 (19:41 +0800)
committerShawn Guo <shawn.guo@linaro.org>
Mon, 1 Apr 2013 08:30:02 +0000 (16:30 +0800)
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

index c8cda1834655889af9800209f2cd0ecaad90ae17..f4dd96ff081a6145432468eb8eede37b891fb377 100644 (file)
@@ -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;