From patchwork Wed Jun 1 07:32:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 1695 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:54:28 -0000 Delivered-To: patches@linaro.org Received: by 10.52.181.10 with SMTP id ds10cs293022vdc; Wed, 1 Jun 2011 00:32:56 -0700 (PDT) Received: by 10.91.133.15 with SMTP id k15mr6110339agn.9.1306913575527; Wed, 01 Jun 2011 00:32:55 -0700 (PDT) Received: from e7.ny.us.ibm.com (e7.ny.us.ibm.com [32.97.182.137]) by mx.google.com with ESMTPS id j11si1892266anb.96.2011.06.01.00.32.55 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Jun 2011 00:32:55 -0700 (PDT) Received-SPF: pass (google.com: domain of jstultz@us.ibm.com designates 32.97.182.137 as permitted sender) client-ip=32.97.182.137; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jstultz@us.ibm.com designates 32.97.182.137 as permitted sender) smtp.mail=jstultz@us.ibm.com Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by e7.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p5179E2f008978; Wed, 1 Jun 2011 03:09:14 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p517WsdT092834; Wed, 1 Jun 2011 03:32:54 -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 p517WsHu030291; Wed, 1 Jun 2011 04:32:54 -0300 Received: from kernel.beaverton.ibm.com (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 p517WrH2030275; Wed, 1 Jun 2011 04:32:53 -0300 Received: by kernel.beaverton.ibm.com (Postfix, from userid 1056) id 14EEF1E750D; Wed, 1 Jun 2011 00:32:53 -0700 (PDT) From: John Stultz To: linux-kernel@vger.kernel.org Cc: John Stultz , Nikolaus Voss , Thomas Gleixner Subject: [PATCH 1/6] clocksource: Convert tcb_clksrc to use clocksource_register_hz/khz Date: Wed, 1 Jun 2011 00:32:45 -0700 Message-Id: <1306913570-9445-2-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.3.2.146.gca209 In-Reply-To: <1306913570-9445-1-git-send-email-john.stultz@linaro.org> References: <1306913570-9445-1-git-send-email-john.stultz@linaro.org> 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);