summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/dmtimer.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@solidboot.com>2006-06-26 16:16:13 -0700
committerTony Lindgren <tony@atomide.com>2006-06-26 16:16:13 -0700
commite32f7ec2e8bf00756c74a5e6a80bc59e949dd81d (patch)
tree1b1e7d588c520ddad11c7ab036c4a50a5e92a49e /arch/arm/plat-omap/dmtimer.c
parent77900a2fc3bfb1eb6eaa6d43eef4591e1f7c600d (diff)
downloadlinux-e32f7ec2e8bf00756c74a5e6a80bc59e949dd81d.tar.bz2
ARM: OMAP: Fix 32 kHz timer and modify GP timer to use GPT1
The dmtimer framework update broke 32 kHz timer as udelay() does not work before system timer is started (and GPT1 should not be reset). This also makes the GP timer use GPT1. This requires a fix in clock framework. Signed-off-by: Timo Teras <timo.teras@solidboot.com> Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/dmtimer.c')
-rw-r--r--arch/arm/plat-omap/dmtimer.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index c25a1a6d2b03..bfccebc77515 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -147,9 +147,10 @@ static void omap_dm_timer_reset(struct omap_dm_timer *timer)
{
u32 l;
- omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, 0x06);
- omap_dm_timer_wait_for_reset(timer);
-
+ if (timer != &dm_timers[0]) {
+ omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, 0x06);
+ omap_dm_timer_wait_for_reset(timer);
+ }
omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_SYS_CLK);
/* Set to smart-idle mode */
@@ -335,7 +336,7 @@ void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
/* When the functional clock disappears, too quick writes seem to
* cause an abort. */
- udelay(50);
+ __delay(15000);
}
#endif