From patchwork Mon Jan 24 11:11:15 2011 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: 500961 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 p0OJh2Vv026265 for ; Mon, 24 Jan 2011 19:44:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752174Ab1AXLLz (ORCPT ); Mon, 24 Jan 2011 06:11:55 -0500 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:60045 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751827Ab1AXLLz (ORCPT ); Mon, 24 Jan 2011 06:11:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=caramon; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=WIx1KHNE3nXFDQSBV94QHnv5Fct/E9DMNk71L7gk7pU=; b=i6XtPk+MAHkCQgL/MBn/VTxHRELYxtacungHXm3vtoebOT02jCRnZr5Xkvi2/0b+RvRZD4SpkM8u60SN/QkzTrOgtagZb+RfSOeJo2U8DYAUqitQxHtFAbYU4SGhpytRc7k45DqB9xZpcouTj6TrH+jeVScD9XRP6NI8WxZ/pns=; Received: from n2100.arm.linux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]) by caramon.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1PhKKK-0001qg-KW; Mon, 24 Jan 2011 11:11:17 +0000 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.72) (envelope-from ) id 1PhKKJ-00053N-Ck; Mon, 24 Jan 2011 11:11:15 +0000 Date: Mon, 24 Jan 2011 11:11:15 +0000 From: Russell King - ARM Linux To: Santosh Shilimkar Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, ccross@android.com, linus.ml.walleij@gmail.com, linux-omap@vger.kernel.org Subject: Re: [PATCH 3/5] ARM: twd: Add context save restore support Message-ID: <20110124111114.GA19409@n2100.arm.linux.org.uk> References: <1295859080-15259-1-git-send-email-santosh.shilimkar@ti.com> <1295859080-15259-4-git-send-email-santosh.shilimkar@ti.com> <20110124110609.GJ16202@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110124110609.GJ16202@n2100.arm.linux.org.uk> User-Agent: Mutt/1.5.19 (2009-01-05) 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.6 (demeter1.kernel.org [140.211.167.41]); Mon, 24 Jan 2011 19:44:10 +0000 (UTC) diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index fd91566..60636f4 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c @@ -36,6 +36,7 @@ static void twd_set_mode(enum clock_event_mode mode, /* timer load already set up */ ctrl = TWD_TIMER_CONTROL_ENABLE | TWD_TIMER_CONTROL_IT_ENABLE | TWD_TIMER_CONTROL_PERIODIC; + __raw_writel(twd_timer_rate / HZ, twd_base + TWD_TIMER_LOAD); break; case CLOCK_EVT_MODE_ONESHOT: /* period set, and timer enabled in 'next_event' hook */ @@ -81,7 +82,7 @@ int twd_timer_ack(void) static void __cpuinit twd_calibrate_rate(void) { - unsigned long load, count; + unsigned long count; u64 waitjiffies; /* @@ -116,10 +117,6 @@ static void __cpuinit twd_calibrate_rate(void) printk("%lu.%02luMHz.\n", twd_timer_rate / 1000000, (twd_timer_rate / 1000000) % 100); } - - load = twd_timer_rate / HZ; - - __raw_writel(load, twd_base + TWD_TIMER_LOAD); } /*