]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
armv8/ls2085a: Enable cluster timebase for all clusters
authorYork Sun <yorksun@freescale.com>
Tue, 6 Jan 2015 21:18:43 +0000 (13:18 -0800)
committerYork Sun <yorksun@freescale.com>
Tue, 24 Feb 2015 21:08:50 +0000 (13:08 -0800)
LS2085A and its variants can have up to four clusters. It is safe
to enable timebase for all even some may be disabled.

Signed-off-by: York Sun <yorksun@freescale.com>
board/freescale/ls2085a/ls2085a.c

index 163a4c486a6acb03c43b377902af8e2112a8c54d..ee75d1b7eda5d6492aeebfd76ebdc15e62a2242c 100644 (file)
@@ -59,8 +59,15 @@ int timer_init(void)
        u32 __iomem *cntcr = (u32 *)CONFIG_SYS_FSL_TIMER_ADDR;
        u32 __iomem *cltbenr = (u32 *)CONFIG_SYS_FSL_PMU_CLTBENR;
 
-       out_le32(cltbenr, 0x1);         /* enable cluster0 timebase */
-       out_le32(cntcr, 0x1);           /* enable clock for timer */
+       /* Enable timebase for all clusters.
+        * It is safe to do so even some clusters are not enabled.
+        */
+       out_le32(cltbenr, 0xf);
+
+       /* Enable clock for timer
+        * This is a global setting.
+        */
+       out_le32(cntcr, 0x1);
 
        return 0;
 }