]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-sa1100/time.c
Pull bugzilla-5534 into release branch
[linux-2.6-omap-h63xx.git] / arch / arm / mach-sa1100 / time.c
index 4284bd6f7a1f583c2af51cc98be24f7e6f638e87..29c89f9eb2ceed1e345fb193d6bf0a2bd0f6f9a9 100644 (file)
@@ -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