Re: [PATCH 08/57] microblaze_v7: Interrupt handling, timer support,selfmod code
From: Thomas Gleixner
Date: Fri Mar 20 2009 - 06:13:57 EST
On Fri, 20 Mar 2009, Michal Simek wrote:
> > Well. Either you have one shot mode, then better make it work and
> > useable or just remove the one shot support until you figure out how
> > to do it.
>
> I don't have it - this feature is not there. There is only printk message in
> set_mode function.
>
> What is the best timer implementation in kernel? (For inspiration)
There is no best :) All timers have usualy some weird hardware
constraints so that code is always ugly. But just as an example:
static int lapic_next_event(unsigned long delta, struct clock_event_device *evt)
{
apic_write(APIC_TMICT, delta);
return 0;
}
I think that's pretty close to your hardware. delta is the number of
timer cycles until the next event. There is no other magic with the
one shot mode :)
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/