From patchwork Mon Dec 13 19:18:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 407412 X-Patchwork-Delegate: paul@pwsan.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBDJIwVQ015073 for ; Mon, 13 Dec 2010 19:18:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753512Ab0LMTS5 (ORCPT ); Mon, 13 Dec 2010 14:18:57 -0500 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:41217 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753346Ab0LMTS4 (ORCPT ); Mon, 13 Dec 2010 14:18:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=caramon; h=Date:Sender:Message-Id:Content-Type:MIME-Version:Subject:Cc:To:From:References:In-Reply-To; bh=1Lkq8ceFhJkUT0RKlgK2iTh/FwddP5wcINkrwCfTMqI=; b=IGYEadLYUo24L4WiKB1gDqyfNA6/j/w7R3/QzTcE1kTyfw7fcU5vVL4kj5tR3uD+Kvt6C/8BHTmRFckMMfPKe+ZpUMAg3nXAnDOsyfLYnQXzOYu4vdQcjQTU6GzSirUZs3+DbiOADTRT8DUC04X+jknDAz8QCYNZkh9HBRVrJMk=; Received: from [2002:4e20:1eda:1:222:68ff:fe15:37dd] (helo=rmk-PC.arm.linux.org.uk) by caramon.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1PSDv2-0004sL-D9; Mon, 13 Dec 2010 19:18:44 +0000 Received: from rmk by rmk-PC.arm.linux.org.uk with local (Exim 4.69) (envelope-from ) id 1PSDv1-0008D0-AK; Mon, 13 Dec 2010 19:18:43 +0000 In-Reply-To: <20101213191437.GN8665@n2100.arm.linux.org.uk> References: <20101213191437.GN8665@n2100.arm.linux.org.uk> From: Russell King - ARM Linux To: linux-arm-kernel@lists.infradead.org Cc: Tony Lindgren , linux-omap@vger.kernel.org Subject: [PATCH 11/24] ARM: omap: update clock source registration MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Mon, 13 Dec 2010 19:18:43 +0000 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 13 Dec 2010 19:18:59 +0000 (UTC) diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index 1be6a21..abb34ff 100644 --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c @@ -208,7 +208,6 @@ static struct clocksource clocksource_mpu = { .rating = 300, .read = mpu_read, .mask = CLOCKSOURCE_MASK(32), - .shift = 24, .flags = CLOCK_SOURCE_IS_CONTINUOUS, }; @@ -217,13 +216,10 @@ static void __init omap_init_clocksource(unsigned long rate) static char err[] __initdata = KERN_ERR "%s: can't register clocksource!\n"; - clocksource_mpu.mult - = clocksource_khz2mult(rate/1000, clocksource_mpu.shift); - setup_irq(INT_TIMER2, &omap_mpu_timer2_irq); omap_mpu_timer_start(1, ~0, 1); - if (clocksource_register(&clocksource_mpu)) + if (clocksource_register_hz(&clocksource_mpu, rate)) printk(err, clocksource_mpu.name); } diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index e13c29e..a7816db 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c @@ -195,7 +195,6 @@ static struct clocksource clocksource_gpt = { .rating = 300, .read = clocksource_read_cycles, .mask = CLOCKSOURCE_MASK(32), - .shift = 24, .flags = CLOCK_SOURCE_IS_CONTINUOUS, }; @@ -220,9 +219,7 @@ static void __init omap2_gp_clocksource_init(void) omap_dm_timer_set_load_start(gpt, 1, 0); - clocksource_gpt.mult = - clocksource_khz2mult(tick_rate/1000, clocksource_gpt.shift); - if (clocksource_register(&clocksource_gpt)) + if (clocksource_register_hz(&clocksource_gpt, tick_rate)) printk(err2, clocksource_gpt.name); } #endif diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c index 155fe43..8f149f5 100644 --- a/arch/arm/plat-omap/counter_32k.c +++ b/arch/arm/plat-omap/counter_32k.c @@ -102,7 +102,6 @@ static struct clocksource clocksource_32k = { .rating = 250, .read = omap_32k_read_dummy, .mask = CLOCKSOURCE_MASK(32), - .shift = 10, .flags = CLOCK_SOURCE_IS_CONTINUOUS, }; @@ -167,12 +166,9 @@ static int __init omap_init_clocksource_32k(void) if (sync_32k_ick) clk_enable(sync_32k_ick); - clocksource_32k.mult = clocksource_hz2mult(32768, - clocksource_32k.shift); - offset_32k = clocksource_32k.read(&clocksource_32k); - if (clocksource_register(&clocksource_32k)) + if (clocksource_register_hz(&clocksource_32k, 32768)) printk(err, clocksource_32k.name); } return 0;