summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-sa1100
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2005-11-08 23:43:06 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-11-08 23:43:06 +0100
commit5285eb57c9a20d8df2569c770ff6048c3202cc91 (patch)
tree51fa28b1941def4d0ec92f7cd4046ffa2c0bc63d /arch/arm/mach-sa1100
parent[ARM] 3134/1: add missing EXPORT_SYMBOL for the ARM version of sha_transform (diff)
downloadlinux-5285eb57c9a20d8df2569c770ff6048c3202cc91.tar.xz
linux-5285eb57c9a20d8df2569c770ff6048c3202cc91.zip
[ARM] 3135/1: harden SA11x0 and PXA2xx timer init code
Patch from Nicolas Pitre Make it completely deterministic and leave nothing to chance (even if it had at worst 0.001% probability of failing). Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-sa1100')
-rw-r--r--arch/arm/mach-sa1100/time.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c
index 47e0420623fc..e4b435e634e4 100644
--- a/arch/arm/mach-sa1100/time.c
+++ b/arch/arm/mach-sa1100/time.c
@@ -124,11 +124,13 @@ static void __init sa1100_timer_init(void)
tv.tv_sec = sa1100_get_rtc_time();
do_settimeofday(&tv);
- OSMR0 = 0; /* set initial match at 0 */
+ OIER = 0; /* disable any timer interrupts */
+ OSCR = LATCH*2; /* push OSCR out of the way */
+ OSMR0 = LATCH; /* set initial match */
OSSR = 0xf; /* clear status on all timers */
setup_irq(IRQ_OST0, &sa1100_timer_irq);
- OIER |= OIER_E0; /* enable match on timer 0 to cause interrupts */
- OSCR = 0; /* initialize free-running timer, force first match */
+ OIER = OIER_E0; /* enable match on timer 0 to cause interrupts */
+ OSCR = 0; /* initialize free-running timer */
}
#ifdef CONFIG_NO_IDLE_HZ