From patchwork Tue Oct 25 18:08:09 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: 4810 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 CFDFB23E0E for ; Tue, 25 Oct 2011 18:08:32 +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 C0843A18149 for ; Tue, 25 Oct 2011 18:08:32 +0000 (UTC) Received: by faan26 with SMTP id n26so1069238faa.11 for ; Tue, 25 Oct 2011 11:08:32 -0700 (PDT) Received: by 10.223.58.146 with SMTP id g18mr26287590fah.13.1319566112478; Tue, 25 Oct 2011 11:08:32 -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 7cs123364lak; Tue, 25 Oct 2011 11:08:31 -0700 (PDT) Received: by 10.150.229.14 with SMTP id b14mr26194706ybh.68.1319566109697; Tue, 25 Oct 2011 11:08:29 -0700 (PDT) Received: from e9.ny.us.ibm.com (e9.ny.us.ibm.com. [32.97.182.139]) by mx.google.com with ESMTPS id x11si1470984ybi.99.2011.10.25.11.08.29 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Oct 2011 11:08:29 -0700 (PDT) Received-SPF: pass (google.com: domain of jstultz@us.ibm.com designates 32.97.182.139 as permitted sender) client-ip=32.97.182.139; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jstultz@us.ibm.com designates 32.97.182.139 as permitted sender) smtp.mail=jstultz@us.ibm.com Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by e9.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p9PHVlv3019247; Tue, 25 Oct 2011 13:31:47 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p9PI8Rh52654308; Tue, 25 Oct 2011 14:08:27 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p9PI8Qbn001853; Tue, 25 Oct 2011 16:08:26 -0200 Received: from kernel.beaverton.ibm.com ([9.47.67.96]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p9PI8KwV001429; Tue, 25 Oct 2011 16:08:21 -0200 Received: by kernel.beaverton.ibm.com (Postfix, from userid 1056) id 65C681E74FB; Tue, 25 Oct 2011 11:08:20 -0700 (PDT) From: y@kernel.beaverton.ibm.com To: lkml Cc: John Stultz , Nikolaus Voss , Thomas Gleixner Subject: [PATCH 1/8] clocksource: Convert tcb_clksrc to use clocksource_register_hz/khz Date: Tue, 25 Oct 2011 11:08:09 -0700 Message-Id: <4ea6fb1d.0b14970a.23e2.ffff8274SMTPIN_ADDED@mx.google.com> X-Mailer: git-send-email 1.7.3.2.146.gca209 From: John Stultz Convert tcb_clksrc to use clocksource_register_hz. Untested. Help from maintainers would be appreciated. CC: Nikolaus Voss CC: Thomas Gleixner Signed-off-by: John Stultz --- drivers/clocksource/tcb_clksrc.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c index 79c47e8..55d0f95 100644 --- a/drivers/clocksource/tcb_clksrc.c +++ b/drivers/clocksource/tcb_clksrc.c @@ -59,7 +59,6 @@ static struct clocksource clksrc = { .rating = 200, .read = tc_get_cycles, .mask = CLOCKSOURCE_MASK(32), - .shift = 18, .flags = CLOCK_SOURCE_IS_CONTINUOUS, }; @@ -256,7 +255,6 @@ static int __init tcb_clksrc_init(void) best_divisor_idx = i; } - clksrc.mult = clocksource_hz2mult(divided_rate, clksrc.shift); printk(bootinfo, clksrc.name, CONFIG_ATMEL_TCB_CLKSRC_BLOCK, divided_rate / 1000000, @@ -292,7 +290,7 @@ static int __init tcb_clksrc_init(void) __raw_writel(ATMEL_TC_SYNC, tcaddr + ATMEL_TC_BCR); /* and away we go! */ - clocksource_register(&clksrc); + clocksource_register_hz(&clksrc, divided_rate); /* channel 2: periodic and oneshot timer support */ setup_clkevents(tc, clk32k_divisor_idx);