lkml.org 
[lkml]   [2009]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2009-03-20 11:17    [W:0.225 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site