From patchwork Tue May 15 07:34:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 8638 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 2C89723E63 for ; Tue, 15 May 2012 07:34:55 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id E7E94A189D7 for ; Tue, 15 May 2012 07:34:54 +0000 (UTC) Received: by ggnf1 with SMTP id f1so4413650ggn.11 for ; Tue, 15 May 2012 00:34:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :x-spamscore:x-bigfish:x-forefront-antispam-report:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-originatororg:x-gm-message-state; bh=i7covoLLTW0sem8LbCWV5+ag9AXX3N34r8/Aaa9q+fU=; b=LYlXl54LE8KeyaRVjFEEukDxQWmQsHVn96Ym/kS3U5yWfkwsB3D0mewwxvJTKoqOCW tlGjctfFIgpvcAxD9s6Dumv6vdHB8wfdbF1k5v+A/Cx/21VEZIbR5WdZVqxjeCQPlnCb hVGLeK7Xbk+ehJocZUi/VJYfU0vuZAWXReOg/LqWaUTOYdFnOc9FGOrXhPlXyw0jadTT X6usHELMZNwJ/wtGTX9VLXIBk2elemOiXqA4KWGFITu2CHMpBqU5pc41vuKDhoTK4pCW OA4fsZVVX85tcWbw6Jlj3P5FnuaSo+34wFn27zIairXh3WpNFNCOBhMqW7dTDVA3o0PF Pxew== Received: by 10.50.163.99 with SMTP id yh3mr1344326igb.53.1337067294240; Tue, 15 May 2012 00:34: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.231.35.72 with SMTP id o8csp400106ibd; Tue, 15 May 2012 00:34:53 -0700 (PDT) Received: by 10.180.87.35 with SMTP id u3mr27270651wiz.11.1337067293021; Tue, 15 May 2012 00:34:53 -0700 (PDT) Received: from tx2outboundpool.messaging.microsoft.com (tx2ehsobe004.messaging.microsoft.com. [65.55.88.14]) by mx.google.com with ESMTPS id c21si21858238wed.53.2012.05.15.00.34.52 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 May 2012 00:34:53 -0700 (PDT) Received-SPF: neutral (google.com: 65.55.88.14 is neither permitted nor denied by best guess record for domain of B20223@freescale.com) client-ip=65.55.88.14; Authentication-Results: mx.google.com; spf=neutral (google.com: 65.55.88.14 is neither permitted nor denied by best guess record for domain of B20223@freescale.com) smtp.mail=B20223@freescale.com Received: from mail34-tx2-R.bigfish.com (10.9.14.246) by TX2EHSOBE006.bigfish.com (10.9.40.26) with Microsoft SMTP Server id 14.1.225.23; Tue, 15 May 2012 07:34:45 +0000 Received: from mail34-tx2 (localhost [127.0.0.1]) by mail34-tx2-R.bigfish.com (Postfix) with ESMTP id 86A013201E0; Tue, 15 May 2012 07:34:45 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839hd24he5bh) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail34-tx2 (localhost.localdomain [127.0.0.1]) by mail34-tx2 (MessageSwitch) id 1337067283835233_6611; Tue, 15 May 2012 07:34:43 +0000 (UTC) Received: from TX2EHSMHS025.bigfish.com (unknown [10.9.14.236]) by mail34-tx2.bigfish.com (Postfix) with ESMTP id C5FEB360107; Tue, 15 May 2012 07:34:43 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS025.bigfish.com (10.9.99.125) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 15 May 2012 07:34:42 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server id 14.2.298.5; Tue, 15 May 2012 02:34:47 -0500 Received: from b20223-02.ap.freescale.net (b20223-02.ap.freescale.net [10.192.242.124]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id q4F7YgxN009821; Tue, 15 May 2012 02:34:45 -0500 (CDT) From: Richard Zhao To: CC: , , Richard Zhao Subject: [PATCH 1/1] ARM: mxc: change timer clock to perclk Date: Tue, 15 May 2012 15:34:40 +0800 Message-ID: <1337067280-11697-1-git-send-email-richard.zhao@freescale.com> X-Mailer: git-send-email 1.7.5.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-Gm-Message-State: ALoCoQm+E5Hzo6tAMUgCD1A4LCHKj2zsQk/lQGK3qHvrgrkqHQrLtvWA21qnxWBy4zGooSbjiNRC fix system time goes too fast. perclk rate not changed or gated in low power mode, so we choose perclk for gpt. Signed-off-by: Richard Zhao --- arch/arm/plat-mxc/time.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c index 99f958c..d865f79 100644 --- a/arch/arm/plat-mxc/time.c +++ b/arch/arm/plat-mxc/time.c @@ -58,6 +58,7 @@ /* MX31, MX35, MX25, MX5 */ #define V2_TCTL_WAITEN (1 << 3) /* Wait enable mode */ #define V2_TCTL_CLK_IPG (1 << 6) +#define V2_TCTL_CLK_PER (2 << 6) #define V2_TCTL_FRR (1 << 9) #define V2_IR 0x0c #define V2_TSTAT 0x08 @@ -309,7 +310,7 @@ void __init mxc_timer_init(struct clk *timer_clk, void __iomem *base, int irq) __raw_writel(0, timer_base + MXC_TPRER); /* see datasheet note */ if (timer_is_v2()) - tctl_val = V2_TCTL_CLK_IPG | V2_TCTL_FRR | V2_TCTL_WAITEN | MXC_TCTL_TEN; + tctl_val = V2_TCTL_CLK_PER | V2_TCTL_FRR | V2_TCTL_WAITEN | MXC_TCTL_TEN; else tctl_val = MX1_2_TCTL_FRR | MX1_2_TCTL_CLK_PCLK1 | MXC_TCTL_TEN;