From patchwork Tue Oct 25 18:08:12 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: 4814 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 17F6523E0E for ; Tue, 25 Oct 2011 18:11:55 +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 0EC2AA1817C for ; Tue, 25 Oct 2011 18:11:55 +0000 (UTC) Received: by faan26 with SMTP id n26so1075048faa.11 for ; Tue, 25 Oct 2011 11:11:54 -0700 (PDT) Received: by 10.223.85.139 with SMTP id o11mr52894534fal.0.1319566314780; Tue, 25 Oct 2011 11:11: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 7cs123481lak; Tue, 25 Oct 2011 11:11:54 -0700 (PDT) Received: by 10.236.193.70 with SMTP id j46mr6250746yhn.108.1319566313642; Tue, 25 Oct 2011 11:11:53 -0700 (PDT) Received: from e3.ny.us.ibm.com (e3.ny.us.ibm.com. [32.97.182.143]) by mx.google.com with ESMTPS id h63si22684157yhe.64.2011.10.25.11.11.53 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Oct 2011 11:11:53 -0700 (PDT) Received-SPF: pass (google.com: domain of jstultz@us.ibm.com designates 32.97.182.143 as permitted sender) client-ip=32.97.182.143; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jstultz@us.ibm.com designates 32.97.182.143 as permitted sender) smtp.mail=jstultz@us.ibm.com Received: from /spool/local by e3.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 25 Oct 2011 14:09:40 -0400 Received: from d01relay02.pok.ibm.com ([9.56.227.234]) by e3.ny.us.ibm.com ([192.168.1.103]) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 25 Oct 2011 14:09:17 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p9PI8R9N451698 for ; Tue, 25 Oct 2011 14:08:28 -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 p9PI8QVJ001870 for ; 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 p9PI8KL6001433; Tue, 25 Oct 2011 16:08:21 -0200 Received: by kernel.beaverton.ibm.com (Postfix, from userid 1056) id 7C72B1E74FE; Tue, 25 Oct 2011 11:08:20 -0700 (PDT) From: y@kernel.beaverton.ibm.com To: lkml Cc: John Stultz , Chris Zankel , Thomas Gleixner Subject: [PATCH 4/8] clocksource: xtensa: Convert to clocksource_register_hz/khz Date: Tue, 25 Oct 2011 11:08:12 -0700 Message-Id: <4ea6fbe9.634fec0a.29b5.60c9SMTPIN_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-8974-0000-0000-00000118BB8B From: John Stultz This converts the xtensa clocksource to use clocksource_register_hz/khz This is untested, so any assistance in testing would be appreciated! CC: Chris Zankel CC: Thomas Gleixner Signed-off-by: John Stultz --- arch/xtensa/kernel/time.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c index f3e5eb4..ac62f9c 100644 --- a/arch/xtensa/kernel/time.c +++ b/arch/xtensa/kernel/time.c @@ -41,14 +41,6 @@ static struct clocksource ccount_clocksource = { .rating = 200, .read = ccount_read, .mask = CLOCKSOURCE_MASK(32), - /* - * With a shift of 22 the lower limit of the cpu clock is - * 1MHz, where NSEC_PER_CCOUNT is 1000 or a bit less than - * 2^10: Since we have 32 bits and the multiplicator can - * already take up as much as 10 bits, this leaves us with - * remaining upper 22 bits. - */ - .shift = 22, }; static irqreturn_t timer_interrupt(int irq, void *dev_id); @@ -66,10 +58,7 @@ void __init time_init(void) printk("%d.%02d MHz\n", (int)ccount_per_jiffy/(1000000/HZ), (int)(ccount_per_jiffy/(10000/HZ))%100); #endif - ccount_clocksource.mult = - clocksource_hz2mult(CCOUNT_PER_JIFFY * HZ, - ccount_clocksource.shift); - clocksource_register(&ccount_clocksource); + clocksource_register_hz(&ccount_clocksource, CCOUNT_PER_JIFFY * HZ); /* Initialize the linux timer interrupt. */