Date:2010-05-28 13:45:20 (10 years 3 months ago)
Author:Lars C.
Commit:d7808b8dd2e1fc7b4bbdd5a156f982913192f12a
Message:jz4740-timer: Mask timer irqs at startup

The timer irqs are unmasked after a reset. To avoid spurious irqs mask them all
during startup.
Files: arch/mips/jz4740/time.c (1 diff)
arch/mips/jz4740/timer.c (1 diff)

Change Details

arch/mips/jz4740/time.c
137137    jz4740_timer_set_period(TIMER_CLOCKEVENT, jz4740_jiffies_per_tick);
138138    jz4740_timer_irq_full_enable(TIMER_CLOCKEVENT);
139139
140    jz4740_timer_irq_full_disable(TIMER_CLOCKSOURCE);
141140    jz4740_timer_set_period(TIMER_CLOCKSOURCE, 0xffff);
142141
143142    jz4740_timer_enable(TIMER_CLOCKEVENT);
arch/mips/jz4740/timer.c
4040    if (!jz4740_timer_base)
4141        panic("Failed to ioremap timer registers");
4242
43    /* Disable all timers except those used as system timers */
44    writel(0x100fc, jz4740_timer_base + JZ_REG_TIMER_STOP_SET);
43    /* Disable all timer clocks except for those used as system timers */
44    writel(0x000100fc, jz4740_timer_base + JZ_REG_TIMER_STOP_SET);
45
46    /* Timer irqs are unmasked by default, mask them */
47    writel(0x00ff00ff, jz4740_timer_base + JZ_REG_TIMER_MASK_SET);
4548}

Archive Download the corresponding diff file



interactive