Messages in this thread | | | Date | Fri, 20 Mar 2009 11:07:53 +0100 (CET) | From | Thomas Gleixner <> | Subject | Re: [PATCH 08/57] microblaze_v7: Interrupt handling, timer support, selfmod code |
| |
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
| |