linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 23/24] ARM: stmp: update clock source registration
Date: Mon, 13 Dec 2010 19:22:47 +0000	[thread overview]
Message-ID: <E1PSDyx-0008Dm-SC@rmk-PC.arm.linux.org.uk> (raw)
In-Reply-To: <20101213191437.GN8665@n2100.arm.linux.org.uk>

In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants.  Switch over to using this new interface.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/plat-stmp3xxx/timer.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-stmp3xxx/timer.c b/arch/arm/plat-stmp3xxx/timer.c
index 063c7bc..c395630 100644
--- a/arch/arm/plat-stmp3xxx/timer.c
+++ b/arch/arm/plat-stmp3xxx/timer.c
@@ -89,7 +89,6 @@ static struct clocksource cksrc_stmp3xxx = {
 	.rating         = 250,
 	.read           = stmp3xxx_clock_read,
 	.mask           = CLOCKSOURCE_MASK(16),
-	.shift          = 10,
 	.flags		= CLOCK_SOURCE_IS_CONTINUOUS,
 };
 
@@ -106,8 +105,6 @@ static struct irqaction stmp3xxx_timer_irq = {
  */
 static void __init stmp3xxx_init_timer(void)
 {
-	cksrc_stmp3xxx.mult = clocksource_hz2mult(CLOCK_TICK_RATE,
-				cksrc_stmp3xxx.shift);
 	ckevt_timrot.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC,
 				ckevt_timrot.shift);
 	ckevt_timrot.min_delta_ns = clockevent_delta2ns(2, &ckevt_timrot);
@@ -140,7 +137,7 @@ static void __init stmp3xxx_init_timer(void)
 
 	setup_irq(IRQ_TIMER0, &stmp3xxx_timer_irq);
 
-	clocksource_register(&cksrc_stmp3xxx);
+	clocksource_register_hz(&cksrc_stmp3xxx, CLOCK_TICK_RATE);
 	clockevents_register_device(&ckevt_timrot);
 }
 
-- 
1.6.2.5

  parent reply	other threads:[~2010-12-13 19:22 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
2010-12-13 19:15 ` [PATCH 01/24] ARM: AT91: update clock source registration Russell King - ARM Linux
2010-12-13 19:15 ` [PATCH 02/24] ARM: bcmring: " Russell King - ARM Linux
2010-12-13 19:36   ` Scott Branden
2010-12-13 20:28     ` {PATCH] BCMRING maintainer change (was RE: [PATCH 02/24] ARM: bcmring: update clock source registration) JD (Jiandong) Zheng
2010-12-13 20:32       ` Scott Branden
2010-12-14 22:01       ` Russell King - ARM Linux
2010-12-13 19:15 ` [PATCH 03/24] ARM: davinci: update clock source registration Russell King - ARM Linux
2010-12-13 19:16 ` [PATCH 04/24] ARM: integrator: " Russell King - ARM Linux
2010-12-13 19:16 ` [PATCH 05/24] ARM: ixp4xx: " Russell King - ARM Linux
2010-12-13 19:17 ` [PATCH 06/24] ARM: lpc32xx: " Russell King - ARM Linux
2010-12-13 19:17 ` [PATCH 07/24] ARM: mmp: " Russell King - ARM Linux
2010-12-13 19:17 ` [PATCH 08/24] ARM: MSM: " Russell King - ARM Linux
2010-12-14 20:32   ` Jeff Ohlstein
2010-12-13 19:18 ` [PATCH 09/24] ARM: netx: " Russell King - ARM Linux
2010-12-13 19:18 ` [PATCH 10/24] ARM: ns9xxx: " Russell King - ARM Linux
2010-12-13 19:18 ` [PATCH 11/24] ARM: omap: " Russell King - ARM Linux
2010-12-13 19:19 ` [PATCH 12/24] ARM: PXA: " Russell King - ARM Linux
2010-12-14  3:09   ` Eric Miao
2010-12-16 10:38     ` Russell King - ARM Linux
2010-12-20 15:10       ` Eric Miao
2010-12-13 19:19 ` [PATCH 13/24] ARM: s5pv310: " Russell King - ARM Linux
2010-12-17  4:49   ` Kukjin Kim
2010-12-13 19:19 ` [PATCH 14/24] ARM: SA11x0: " Russell King - ARM Linux
2010-12-13 19:20 ` [PATCH 15/24] ARM: tcc8k: " Russell King - ARM Linux
2010-12-13 19:20 ` [PATCH 16/24] ARM: U300: " Russell King - ARM Linux
2010-12-14  4:02   ` Linus WALLEIJ
2010-12-13 19:20 ` [PATCH 17/24] ARM: nuc: " Russell King - ARM Linux
2010-12-13 19:21 ` [PATCH 18/24] ARM: iop: " Russell King - ARM Linux
2010-12-13 19:21 ` [PATCH 19/24] ARM: mxc: " Russell King - ARM Linux
2010-12-14 10:46   ` Sascha Hauer
2010-12-13 19:21 ` [PATCH 20/24] ARM: nomadik: " Russell King - ARM Linux
2010-12-14  4:04   ` Linus WALLEIJ
2010-12-13 19:22 ` [PATCH 21/24] ARM: spear: " Russell King - ARM Linux
2010-12-14  4:04   ` viresh kumar
2010-12-13 19:22 ` [PATCH 22/24] ARM: orion: " Russell King - ARM Linux
2010-12-13 19:26   ` Nicolas Pitre
2010-12-13 19:22 ` Russell King - ARM Linux [this message]
2010-12-13 19:23 ` [PATCH 24/24] ARM: realview/versatile: " Russell King - ARM Linux

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=E1PSDyx-0008Dm-SC@rmk-PC.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).