Override timer interrupt

Mark A. Greer mgreer at mvista.com
Sat Oct 13 07:30:41 EST 2007

On Fri, Oct 12, 2007 at 03:43:39PM -0500, Rune Torgersen wrote:
> Is there an easy way to use something other than the decrementer for the
> timer interrupt?
> Reason i'm asking is tha t on our board, the decrementer cannot be
> divided to 1khz evenly, so we have rounding errors for time, but we do
> have a 1KHz timer interrupt from an FPGA that is source of a T1 clock.
> Right now I let the decrementer interrupt do nothing, and made my own
> timer interrupt handler that calls the stuff the timer_interrupt usually
> does. 
> This works, but there are some instability (ie unexplained hangs) that
> showed up when I did this.

Check out the clocksource stuff.  It let's you set up numerous clock
sources and set the rating of each one.  You can start looking in
arch/powerpc/kernel/time.c for example code.


More information about the Linuxppc-embedded mailing list