Date:2011-03-04 18:24:50 (9 years 3 months ago)
Author:Lars C.
Commit:d9ee7e9ad356e064fcec692f73122c560dbfaf06
Message:Don't make any assumptions about which timers are used as sytem timers

Files: arch/mips/jz47xx/timer-cevt.c (2 diffs)
arch/mips/jz47xx/timer-csrc.c (1 diff)
arch/mips/jz47xx/timer.c (1 diff)

Change Details

arch/mips/jz47xx/timer-cevt.c
9090
9191void __init jz47xx_timer_cevt_init(unsigned int irq, unsigned int timer_id)
9292{
93    uint32_t clk_rate;
93    unsigned int clk_rate;
9494
9595    jz47xx_timer_clockevent = timer_id;
9696
...... 
108108
109109    setup_irq(irq, &timer_irqaction);
110110
111    jz4740_timer_start(jz47xx_timer_clockevent);
112
111113    jz4740_timer_set_ctrl(jz47xx_timer_clockevent,
112114        JZ_TIMER_CTRL_PRESCALE_16 | JZ_TIMER_CTRL_SRC_EXT);
113115
arch/mips/jz47xx/timer-csrc.c
5555        return ret;
5656    }
5757
58    jz4740_timer_start(jz47xx_timer_clocksource);
59
5860    jz4740_timer_set_ctrl(jz47xx_timer_clocksource,
5961        JZ_TIMER_CTRL_PRESCALE_16 | JZ_TIMER_CTRL_SRC_EXT);
6062
arch/mips/jz47xx/timer.c
4141        panic("Failed to ioremap timer registers");
4242
4343    /* Disable all timer clocks except for those used as system timers */
44    writel(0x000100fc, jz4740_timer_base + JZ_REG_TIMER_STOP_SET);
44    writel(0x000100ff, jz4740_timer_base + JZ_REG_TIMER_STOP_SET);
4545
4646    /* Timer irqs are unmasked by default, mask them */
4747    writel(0x00ff00ff, jz4740_timer_base + JZ_REG_TIMER_MASK_SET);

Archive Download the corresponding diff file



interactive