diff options
author | Nicolas Pitre <nico@cam.org> | 2006-11-20 22:19:29 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-11-30 13:52:45 +0100 |
commit | 46ec0ce8ce7eab6242188ea8a596538753c53b22 (patch) | |
tree | 03a50ddfe2dafbdbf2ecf6297a1c4e45a7d58c75 /arch | |
parent | [ARM] 3939/1: don't reset SA11x0 clock counter (diff) | |
download | linux-46ec0ce8ce7eab6242188ea8a596538753c53b22.tar.xz linux-46ec0ce8ce7eab6242188ea8a596538753c53b22.zip |
[ARM] 3940/1: don't reset PXA2xx 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')
-rw-r--r-- | arch/arm/mach-pxa/time.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index 3ac268fa419b..b91466861029 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c @@ -124,6 +124,7 @@ static struct irqaction pxa_timer_irq = { static void __init pxa_timer_init(void) { struct timespec tv; + unsigned long flags; set_rtc = pxa_set_rtc; @@ -132,12 +133,12 @@ static void __init pxa_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, &pxa_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 |