From patchwork Mon Mar 14 13:18:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 549 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:43:35 -0000 Delivered-To: patches@linaro.org Received: by 10.224.45.75 with SMTP id d11cs55670qaf; Mon, 14 Mar 2011 06:16:26 -0700 (PDT) Received: by 10.150.243.15 with SMTP id q15mr5326545ybh.26.1300108585997; Mon, 14 Mar 2011 06:16:25 -0700 (PDT) Received: from mail-gw0-f50.google.com (mail-gw0-f50.google.com [74.125.83.50]) by mx.google.com with ESMTPS id q3si6690625ybe.64.2011.03.14.06.16.24 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 14 Mar 2011 06:16:24 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.50 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) client-ip=74.125.83.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.83.50 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) smtp.mail=shawn.guo@linaro.org Received: by gwj16 with SMTP id 16so2279856gwj.37 for ; Mon, 14 Mar 2011 06:16:24 -0700 (PDT) Received: by 10.91.60.15 with SMTP id n15mr3158975agk.80.1300108584607; Mon, 14 Mar 2011 06:16:24 -0700 (PDT) Received: from localhost.localdomain ([114.216.146.145]) by mx.google.com with ESMTPS id d14sm6011637ana.0.2011.03.14.06.16.16 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 14 Mar 2011 06:16:24 -0700 (PDT) From: Shawn Guo To: devicetree-discuss@lists.ozlabs.org, linaro-dev@lists.linaro.org Cc: patches@linaro.org, Shawn Guo Subject: [PATCH 2/5] arm/mxc: add clk member 'rate' to ease dt fixed-clock support Date: Mon, 14 Mar 2011 21:18:39 +0800 Message-Id: <1300108722-3254-3-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1300108722-3254-1-git-send-email-shawn.guo@linaro.org> References: <1300108722-3254-1-git-send-email-shawn.guo@linaro.org> This new member is not necessary to support dt clock, but it can simplified the code a lot in terms of those fixed rate clocks. Signed-off-by: Shawn Guo --- arch/arm/plat-mxc/include/mach/clock.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/arm/plat-mxc/include/mach/clock.h b/arch/arm/plat-mxc/include/mach/clock.h index 753a598..e688b49 100644 --- a/arch/arm/plat-mxc/include/mach/clock.h +++ b/arch/arm/plat-mxc/include/mach/clock.h @@ -38,6 +38,10 @@ struct clk { /* Register address for clock's enable/disable control. */ void __iomem *enable_reg; u32 flags; +#ifdef CONFIG_OF + /* clock rate used by fixed-clock */ + unsigned long rate; +#endif /* get the current clock rate (always a fresh value) */ unsigned long (*get_rate) (struct clk *); /* Function ptr to set the clock to a new rate. The rate must match a