summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/arch-mx35
diff options
context:
space:
mode:
authorAndrew Ruder <andrew.ruder@elecsyscorp.com>2014-08-12 09:26:01 -0500
committerStefano Babic <sbabic@denx.de>2014-09-16 12:53:09 +0200
commit816264fc6672dbb7c7b22ad9e67b8d0056873394 (patch)
tree7b34c0a35ea48fd8cef36d34c0e38215a22ff91b /arch/arm/include/asm/arch-mx35
parent93a0ea501e1eca1ae5d7d2624906b656c765e5e8 (diff)
downloadu-boot-816264fc6672dbb7c7b22ad9e67b8d0056873394.tar.gz
arm: mx35: use common timer functions
This patch moves mx35 to the common timer functions added in commit 8dfafdd - Introduce common timer functions <Rob Herring> The (removed) mx35 timer code (specifically __udelay()) could deadlock at the 32-bit boundary of get_ticks(). get_ticks() returned a 32-bit value cast up to a 64-bit value. If get_ticks() + tmo in __udelay() crossed the 32-bit boundary, the while condition became unconditionally true and locks the processor. Rather than patch the specific mx35 issues, simply move everything over to the common code. Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com> Cc: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'arch/arm/include/asm/arch-mx35')
-rw-r--r--arch/arm/include/asm/arch-mx35/imx-regs.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-mx35/imx-regs.h b/arch/arm/include/asm/arch-mx35/imx-regs.h
index b5300291a9..28a47ed44d 100644
--- a/arch/arm/include/asm/arch-mx35/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx35/imx-regs.h
@@ -372,4 +372,16 @@ struct aips_regs {
#define CCM_RCSR_NF_16BIT_SEL (1 << 14)
#endif
+
+/*
+ * Generic timer support
+ */
+#ifdef CONFIG_MX35_CLK32
+#define CONFIG_SYS_TIMER_RATE CONFIG_MX35_CLK32
+#else
+#define CONFIG_SYS_TIMER_RATE 32768
+#endif
+
+#define CONFIG_SYS_TIMER_COUNTER (GPT1_BASE_ADDR+36)
+
#endif /* __ASM_ARCH_MX35_H */