Commit bf46878c authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Russell King

[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: default avatarNicolas Pitre <nico@cam.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 10dd5ce2
...@@ -118,6 +118,7 @@ static struct irqaction sa1100_timer_irq = { ...@@ -118,6 +118,7 @@ static struct irqaction sa1100_timer_irq = {
static void __init sa1100_timer_init(void) static void __init sa1100_timer_init(void)
{ {
struct timespec tv; struct timespec tv;
unsigned long flags;
set_rtc = sa1100_set_rtc; set_rtc = sa1100_set_rtc;
...@@ -126,12 +127,12 @@ static void __init sa1100_timer_init(void) ...@@ -126,12 +127,12 @@ static void __init sa1100_timer_init(void)
do_settimeofday(&tv); do_settimeofday(&tv);
OIER = 0; /* disable any timer interrupts */ 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 */ OSSR = 0xf; /* clear status on all timers */
setup_irq(IRQ_OST0, &sa1100_timer_irq); setup_irq(IRQ_OST0, &sa1100_timer_irq);
local_irq_save(flags);
OIER = OIER_E0; /* enable match on timer 0 to cause interrupts */ 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 #ifdef CONFIG_NO_IDLE_HZ
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment