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:

> Thomas,
>
> just one other question.
> For me will be useful to use second timer which is inside timer IP core.
> There are two timers with one interrupt line. And I can of course resolve which
> counter cause it. That's no problem.
>
> My question is about timer_irqaction where is dev_id. What should be there?
> Point to clocksource structure or clockevent?
>
> static struct irqaction timer_irqaction = {
> .handler = timer_interrupt,
> .flags = IRQF_DISABLED | IRQF_TIMER,
> .name = "timer",
> .dev_id = &clocksource_microblaze,
> };

The clockevent of course. It's the one which emits the interrupts.

Just for clarification. The clocksource is basically a counter to read
out the current time. Such a counter usually does not deliver
interrupts. It wraps at some point, but that is handled by the generic
time keeping code. If you setup the 32 bit counter to count up and let
it run free then the counter will wrap from 0xffffffff to 0. Nothing
you have to worry about. You just provide a function to read it.

The clockevent is the device which delivers either periodic or oneshot
interrupts. Sa you dont have to worry about the shared interrupt line
in that case.

Thanks,

tglx


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