From patchwork Fri Mar 18 18:24:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 671 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:44:36 -0000 Delivered-To: patches@linaro.org Received: by 10.220.28.198 with SMTP id n6cs33322vcc; Fri, 18 Mar 2011 11:21:50 -0700 (PDT) Received: by 10.231.67.201 with SMTP id s9mr1210543ibi.176.1300472510365; Fri, 18 Mar 2011 11:21:50 -0700 (PDT) Received: from mail-iw0-f178.google.com (mail-iw0-f178.google.com [209.85.214.178]) by mx.google.com with ESMTPS id q7si6464433ibb.57.2011.03.18.11.21.48 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 Mar 2011 11:21:49 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.214.178 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) client-ip=209.85.214.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.214.178 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) smtp.mail=shawn.guo@linaro.org Received: by iwn9 with SMTP id 9so5339142iwn.37 for ; Fri, 18 Mar 2011 11:21:48 -0700 (PDT) Received: by 10.43.62.10 with SMTP id wy10mr2041791icb.205.1300472508509; Fri, 18 Mar 2011 11:21:48 -0700 (PDT) Received: from localhost.localdomain ([114.216.152.45]) by mx.google.com with ESMTPS id mv26sm736763ibb.6.2011.03.18.11.21.43 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 Mar 2011 11:21:47 -0700 (PDT) From: Shawn Guo To: devicetree-discuss@lists.ozlabs.org Cc: linaro-dev@lists.linaro.org, patches@linaro.org, grant.likely@secretlab.ca, Shawn Guo Subject: [PATCH v2 2/6] arm/mxc: add clk member 'rate' to ease dt fixed-clock support Date: Sat, 19 Mar 2011 02:24:28 +0800 Message-Id: <1300472672-13392-3-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1300472672-13392-1-git-send-email-shawn.guo@linaro.org> References: <1300472672-13392-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