linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Magnus Damm <magnus.damm@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: horms@verge.net.au, arnd@arndb.de, linux-sh@vger.kernel.org,
	johnstul@us.ibm.com, rjw@sisk.pl, lethal@linux-sh.org,
	gregkh@linuxfoundation.org, olof@lixom.net,
	Magnus Damm <magnus.damm@gmail.com>,
	tglx@linutronix.de
Subject: [PATCH 00/03] clocksource: Emma Mobile STI V2 patches
Date: Wed, 09 May 2012 14:39:26 +0000	[thread overview]
Message-ID: <20120509143926.27521.20342.sendpatchset@w520> (raw)

clocksource: Emma Mobile STI V2 patches

[PATCH 01/03] clockevents: Make clockevents_config() a global symbol
[PATCH 02/03] clocksource: em_sti: Emma Mobile STI driver V2
[PATCH 03/03] clocksource: em_sti: Add DT support

This is the second version of Emma Mobile STI driver. Now with
significantly cleaner clockevent intergration and DT support.

The driver is implemented as a regular platform device which makes
use of the STI hardware and provides both clocksource and clockevent
interfaces with a single 48-bit hardware counter.

It is worth mentioning that the driver makes use of clockevents_config()
to update the timer frequency after registration time. This is done to
save power by making sure that unused timer hardware is stopped whenever
possible.

The reason behind allowing the driver to use clockevents_config() is in
detail as follows. The clock associated with the timer gets enabled when
starting the clocksource/clockevent and it gets disabled when the
clocksource or clockevent gets stopped. Due to the design of the clock
framework the rate of the clock is only known after the clock has been
enabled. And to save power the clock is only enabled when it is known
that it will be used - and to know that the clocksource/clockevent needs
to be registered first. This in turn means that we are unaware of the
frequency at registration time. Which leads to that it is not sufficient
to use a fixed frequency at registration time but we must instead make
sure the frequency is updated after each clk_enable().

Many thanks to Thomas Gleixner for very useful V1 feedback.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/Kconfig |   12 
 drivers/clocksource/Makefile   |    2 
 drivers/clocksource/em_sti.c   |  843 ++++++++++++++++++++++++++++++++++++++++
 include/linux/clockchips.h     |    1 
 kernel/time/clockevents.c      |    3 
 5 files changed, 859 insertions(+), 2 deletions(-)

 

             reply	other threads:[~2012-05-09 14:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09 14:39 Magnus Damm [this message]
2012-05-09 14:39 ` [PATCH 01/03] clockevents: Make clockevents_config() a global symbol Magnus Damm
2012-05-23  6:32   ` Paul Mundt
2012-05-23  7:15     ` Magnus Damm
2012-05-24 10:27     ` Thomas Gleixner
2012-05-24 10:28       ` Thomas Gleixner
2012-05-09 14:39 ` [PATCH 02/03] clocksource: em_sti: Emma Mobile STI driver V2 Magnus Damm
2012-05-24 23:42   ` Thomas Gleixner
2012-05-25  3:39     ` Magnus Damm
2012-05-09 14:39 ` [PATCH 03/03] clocksource: em_sti: Add DT support Magnus Damm
2012-05-11  6:55 ` [PATCH 00/03] clocksource: Emma Mobile STI V2 patches Simon Horman

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=20120509143926.27521.20342.sendpatchset@w520 \
    --to=magnus.damm@gmail.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=horms@verge.net.au \
    --cc=johnstul@us.ibm.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=rjw@sisk.pl \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).