diff options
author | Nicolas Pitre <nico@cam.org> | 2006-11-20 22:17:09 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-11-30 12:52:44 +0000 |
commit | bf46878c4ef4cf04a3564f0ff2e7daae353ee2e2 (patch) | |
tree | 5ea7ff12fea73f8352c1a4d630b15160e6709352 /arch/arm/mach-sa1100/time.c | |
parent | 10dd5ce28d78e2440e8fa1135d17e33399d75340 (diff) | |
download | linux-bf46878c4ef4cf04a3564f0ff2e7daae353ee2e2.tar.gz linux-bf46878c4ef4cf04a3564f0ff2e7daae353ee2e2.tar.bz2 linux-bf46878c4ef4cf04a3564f0ff2e7daae353ee2e2.zip |
[ARM] 3939/1: don't reset SA11x0 clock counter
Don't reset OSCR to zero as this prevents us from having a contiguous
time source. The value returned by sched_clock() is reset to zero in the
middle of the boot process otherwise, making CONFIG_PRINTK_TIME rather
messed up.
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/time.c')
-rw-r--r-- | arch/arm/mach-sa1100/time.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c index 4284bd6f7a1f..29c89f9eb2ce 100644 --- a/arch/arm/mach-sa1100/time.c +++ b/arch/arm/mach-sa1100/time.c @@ -118,6 +118,7 @@ static struct irqaction sa1100_timer_irq = { static void __init sa1100_timer_init(void) { struct timespec tv; + unsigned long flags; set_rtc = sa1100_set_rtc; @@ -126,12 +127,12 @@ static void __init sa1100_timer_init(void) do_settimeofday(&tv); 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); + local_irq_save(flags); OIER = OIER_E0; /* enable match on timer 0 to cause interrupts */ - OSCR = 0; /* initialize free-running timer */ + OSMR0 = OSCR + LATCH; /* set initial match */ + local_irq_restore(flags); } #ifdef CONFIG_NO_IDLE_HZ |