lkml.org 
[lkml]   [2014]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectWriting clocksource driver, tips?
Hello all,

currently i work on porting linux to Aplscale ASM9260,
most basic parts are done, now is the time for clocksource driver. I
never did it before, so i need some beginner tips.
My current driver clocksource provide periodic events at 100Hz rate. But
this hardvare can do more then it.
This SoC has 4 32bit-timer controller attached to 100MHz source. Each
controller has 4 separate timer register each of them can be configure
separately for scale, match and interrupt. 3 controllers can choice the
tick source.
This controller looks similar to one found on NXP LPC1311, but looks
like no similar hardware in drivers/clocksource.

For now i have fallowing questions:
- 1 timer can be used for clocksource other as clock_event_device, how
can i use other 2 timers on same controller. and how can i use other 3
controllers?
- theoretically i can use clocksource_mmio_init to read directly
timer_counter_register. Which scale should be used on it. 100MHz is
probably too match.
- should clocksource provide interrupt on overflow or some kind of limit?

--
Regards,
Oleksij

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-08-31 19:01    [W:0.038 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site