aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMehnert, Torsten <T.Mehnert@eckelmann.de>2011-08-01 04:02:07 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2011-08-01 06:17:49 -0400
commit2012d9ca2a1381ae3e733330a7f0d1d2f1988bba (patch)
treea05ea02c69c70febd63b6c7960cbe59e05812360 /arch
parent1c4b45d8f6bda8e457f674f3a67aa9b2e57830c7 (diff)
i.MX25 GPT clock fix: ensure correct the clock source
Request for comment and commit. From: T. Mehnert <t.mehnert@eckelmann.de> Date: Mon, 4 Jul 2011 15:53:30 +0200 Subject: [PATCH] i.MX25 GPT clock fix: ensure correct the clock source This patch ensures, that Linux will take the correct clock source (AHB_DIV) for gpt in the ARM i.MX25 implementation. The currect code depends on the reset defaults of the CCM_MCR register. So on some boards it could happen that the UPLL is used for clock source, which results in faulty time behavior in Linux. In this case all delays or sleeps will will be faktor 1.8 too long. Signed-off-by: Torsten Mehnert <t.mehnert@eckelmann.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/clock-imx25.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/clock-imx25.c b/arch/arm/mach-imx/clock-imx25.c
index a65838fc061c..e40c0b320d4a 100644
--- a/arch/arm/mach-imx/clock-imx25.c
+++ b/arch/arm/mach-imx/clock-imx25.c
@@ -328,6 +328,9 @@ int __init mx25_clocks_init(void)
328 __raw_writel(__raw_readl(CRM_BASE+0x64) | (1 << 7) | (1 << 0), 328 __raw_writel(__raw_readl(CRM_BASE+0x64) | (1 << 7) | (1 << 0),
329 CRM_BASE + 0x64); 329 CRM_BASE + 0x64);
330 330
331 /* Clock source for gpt is ahb_div */
332 __raw_writel(__raw_readl(CRM_BASE+0x64) & ~(1 << 5), CRM_BASE + 0x64);
333
331 mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); 334 mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54);
332 335
333 return 0; 336 return 0;