All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksij Rempel <linux@rempel-privat.de>
To: linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Daniel Lezcano <daniel.lezcano@linaro.org>
Subject: Writing clocksource driver, tips?
Date: Sun, 31 Aug 2014 18:46:12 +0200	[thread overview]
Message-ID: <54035154.6080306@rempel-privat.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

             reply	other threads:[~2014-08-31 16:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-31 16:46 Oleksij Rempel [this message]
2014-09-01  8:35 ` Writing clocksource driver, tips? Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54035154.6080306@rempel-privat.de \
    --to=linux@rempel-privat.de \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.