From patchwork Fri Mar 18 18:24:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 673 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:37 -0000 Delivered-To: patches@linaro.org Received: by 10.220.28.198 with SMTP id n6cs33337vcc; Fri, 18 Mar 2011 11:22:12 -0700 (PDT) Received: by 10.42.19.5 with SMTP id z5mr2021106ica.284.1300472532557; Fri, 18 Mar 2011 11:22:12 -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.22.12 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 Mar 2011 11:22:12 -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 mail-iw0-f178.google.com with SMTP id 9so5339142iwn.37 for ; Fri, 18 Mar 2011 11:22:12 -0700 (PDT) Received: by 10.42.130.130 with SMTP id v2mr1252103ics.233.1300472532058; Fri, 18 Mar 2011 11:22:12 -0700 (PDT) Received: from localhost.localdomain ([114.216.152.45]) by mx.google.com with ESMTPS id mv26sm736763ibb.6.2011.03.18.11.22.05 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 Mar 2011 11:22:10 -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 5/6] arm/dt: mx5: change timer init function to dt clock way Date: Sat, 19 Mar 2011 02:24:31 +0800 Message-Id: <1300472672-13392-6-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> The big deal here is that it removes the call to mx51_clocks_init, where all the possible clocks are added to clkdev in static way. Signed-off-by: Shawn Guo --- arch/arm/mach-mx5/board-dt.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-mx5/board-dt.c b/arch/arm/mach-mx5/board-dt.c index 62ca693..f620ded 100644 --- a/arch/arm/mach-mx5/board-dt.c +++ b/arch/arm/mach-mx5/board-dt.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -42,8 +43,14 @@ static void __init mx51_dt_board_init(void) static void __init mx51_dt_timer_init(void) { - mx51_clocks_init(32768, 24000000, 22579200, 0); + struct clk *clk; + mx5_clk_dt_init(); + + clk = clk_get_sys("gpt", NULL); + if (!IS_ERR(clk)) + mxc_timer_init(clk, MX51_IO_ADDRESS(MX51_GPT1_BASE_ADDR), + MX51_MXC_INT_GPT); } static struct sys_timer mxc_timer = {