From patchwork Tue Oct 25 18:08:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: y@kernel.beaverton.ibm.com X-Patchwork-Id: 4812 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id F158923E0E for ; Tue, 25 Oct 2011 18:09:54 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id E1FAFA1817C for ; Tue, 25 Oct 2011 18:09:54 +0000 (UTC) Received: by faan26 with SMTP id n26so1071750faa.11 for ; Tue, 25 Oct 2011 11:09:54 -0700 (PDT) Received: by 10.223.85.139 with SMTP id o11mr52884015fal.0.1319566194694; Tue, 25 Oct 2011 11:09:54 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.1.71 with SMTP id 7cs123418lak; Tue, 25 Oct 2011 11:09:54 -0700 (PDT) Received: by 10.236.186.34 with SMTP id v22mr22629563yhm.89.1319566192502; Tue, 25 Oct 2011 11:09:52 -0700 (PDT) Received: from e4.ny.us.ibm.com (e4.ny.us.ibm.com. [32.97.182.144]) by mx.google.com with ESMTPS id l12si11455077anh.167.2011.10.25.11.09.51 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Oct 2011 11:09:52 -0700 (PDT) Received-SPF: pass (google.com: domain of jstultz@us.ibm.com designates 32.97.182.144 as permitted sender) client-ip=32.97.182.144; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jstultz@us.ibm.com designates 32.97.182.144 as permitted sender) smtp.mail=jstultz@us.ibm.com Received: from /spool/local by e4.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 25 Oct 2011 14:08:37 -0400 Received: from d01relay03.pok.ibm.com ([9.56.227.235]) by e4.ny.us.ibm.com ([192.168.1.104]) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 25 Oct 2011 14:08:29 -0400 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p9PI8SVJ262176; Tue, 25 Oct 2011 14:08:28 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p9PI8QLX017167; Tue, 25 Oct 2011 14:08:27 -0400 Received: from kernel.beaverton.ibm.com ([9.47.67.96]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p9PI8Nvd016982; Tue, 25 Oct 2011 14:08:23 -0400 Received: by kernel.beaverton.ibm.com (Postfix, from userid 1056) id 94D331E7501; Tue, 25 Oct 2011 11:08:20 -0700 (PDT) From: y@kernel.beaverton.ibm.com To: lkml Cc: John Stultz , Geert Uytterhoeven , Greg Ungerer , Lucas De Marchi Subject: [PATCH 7/8] clocksource: Convert m68k to use clocksource_register_hz/khz Date: Tue, 25 Oct 2011 11:08:15 -0700 Message-Id: <4ea6fb70.0cee640a.3b3d.7d9dSMTPIN_ADDED@mx.google.com> X-Mailer: git-send-email 1.7.3.2.146.gca209 In-Reply-To: <1319566096-3222-1-git-send-email-y> References: <1319566096-3222-1-git-send-email-y> x-cbid: 11102518-3534-0000-0000-000000E674F3 From: John Stultz Cleanup m68k clocksource registration. This is untested, so any assistance in testing would be appreciated! CC: Geert Uytterhoeven CC: Greg Ungerer CC: Lucas De Marchi Signed-off-by: John Stultz --- arch/m68k/platform/coldfire/pit.c | 4 +--- arch/m68k/platform/coldfire/sltimers.c | 4 +--- arch/m68k/platform/coldfire/timers.c | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/arch/m68k/platform/coldfire/pit.c b/arch/m68k/platform/coldfire/pit.c index c2b9809..02663d2 100644 --- a/arch/m68k/platform/coldfire/pit.c +++ b/arch/m68k/platform/coldfire/pit.c @@ -144,7 +144,6 @@ static struct clocksource pit_clk = { .name = "pit", .rating = 100, .read = pit_read_clk, - .shift = 20, .mask = CLOCKSOURCE_MASK(32), }; @@ -162,8 +161,7 @@ void hw_timer_init(void) setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &pit_irq); - pit_clk.mult = clocksource_hz2mult(FREQ, pit_clk.shift); - clocksource_register(&pit_clk); + clocksource_register_hz(&pit_clk, FREQ); } /***************************************************************************/ diff --git a/arch/m68k/platform/coldfire/sltimers.c b/arch/m68k/platform/coldfire/sltimers.c index 6a85daf..b7f822b 100644 --- a/arch/m68k/platform/coldfire/sltimers.c +++ b/arch/m68k/platform/coldfire/sltimers.c @@ -114,7 +114,6 @@ static struct clocksource mcfslt_clk = { .name = "slt", .rating = 250, .read = mcfslt_read_clk, - .shift = 20, .mask = CLOCKSOURCE_MASK(32), .flags = CLOCK_SOURCE_IS_CONTINUOUS, }; @@ -136,8 +135,7 @@ void hw_timer_init(void) setup_irq(MCF_IRQ_TIMER, &mcfslt_timer_irq); - mcfslt_clk.mult = clocksource_hz2mult(MCF_BUSCLK, mcfslt_clk.shift); - clocksource_register(&mcfslt_clk); + clocksource_register_hz(&mcfslt_clk, MCF_BUSCLK); #ifdef CONFIG_HIGHPROFILE mcfslt_profile_init(); diff --git a/arch/m68k/platform/coldfire/timers.c b/arch/m68k/platform/coldfire/timers.c index 60242f6..0d90da3 100644 --- a/arch/m68k/platform/coldfire/timers.c +++ b/arch/m68k/platform/coldfire/timers.c @@ -88,7 +88,6 @@ static struct clocksource mcftmr_clk = { .name = "tmr", .rating = 250, .read = mcftmr_read_clk, - .shift = 20, .mask = CLOCKSOURCE_MASK(32), .flags = CLOCK_SOURCE_IS_CONTINUOUS, }; @@ -109,8 +108,7 @@ void hw_timer_init(void) __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR)); - mcftmr_clk.mult = clocksource_hz2mult(FREQ, mcftmr_clk.shift); - clocksource_register(&mcftmr_clk); + clocksource_register_hz(&mcftmr_clk, FREQ); setup_irq(MCF_IRQ_TIMER, &mcftmr_timer_irq);