[lkml]   [2008]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 08/56] microblaze_v2: Interrupt handling, timer support, supported function
Hi Thomas,

> Michal,
> On Sun, 11 May 2008, Michal Simek wrote:
>>> Please split this modification code out into a separate function. The
>>> same code is used below.
>> Add Macro.
> Please use a (inline) function whenever possible. Macros are harder to
> read and not type safe.

I'll try it.

>>> Can you please move a new architecture to clockevents / clocksource
>>> right from the beginning ? No need to invent another incompatible set
>>> of time(r) related functions.
>> I move whole code to GENERIC_TIME. Did you meant any others changes?
> GENERIC_TIME and GENERIC_CLOCKEVENTS. You get high resolution timers
> and dynamic ticks for free when your timer hardware allows it.

About CLOCKEVENTS. I looked at arm/mach-versatile/

and I found I need implement:
loading current timer value -

clock_event_device.set_mode - set one from fourth modes
clock_event_device.set_next_event - the same mode with new init timer value
(this is little bit mess for me because arm do this that only change actual
counting value - I hope I do that too).

Supported modes are:
CLOCK_EVT_MODE_PERIODIC - reload and timer interrupt
CLOCK_EVT_MODE_ONESHOT - one interrupt at zero value and end - no others interrupts.

I hope I can use only one timer(adding extra timers is not problem).
We have one timer with two timebase (that's one option in IP core).

And there is necessary to fill some value in timer initializing
timer0_clockevent.mult - nanosecond to cycles multiplier ?
timer0_clockevent.shift - nanoseconds to cycles divisor (power of two)?
timer0_clockevent.irq - irq from our intc.
timer0_clockevent.min_delta_ns - minimal timer resolution (I think this value
have to be sensible for system)
timer0_clockevent.max_delta_ns - maximal timer resolution
timer0_clockevent.cpumask = 0 for 1 cpu

I hope others is set by general code.

and change handler function to calling evt->enent_handler;

I found that archs use sys for showing values.

I hope I can see that this systems works via /proc/interrupts and from sysfs.

Am I right?


 \ /
  Last update: 2008-05-11 23:57    [W:0.099 / U:12.708 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site