From patchwork Mon Mar 14 13:18:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 547 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 d11cs55688qaf; Mon, 14 Mar 2011 06:16:43 -0700 (PDT) Received: by 10.91.4.36 with SMTP id g36mr3189279agi.21.1300108603304; Mon, 14 Mar 2011 06:16:43 -0700 (PDT) Received: from mail-gx0-f178.google.com (mail-gx0-f178.google.com [209.85.161.178]) by mx.google.com with ESMTPS id x39si18674152anx.6.2011.03.14.06.16.43 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 14 Mar 2011 06:16:43 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.161.178 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) client-ip=209.85.161.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.161.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-gx0-f178.google.com with SMTP id 8so1252068gxk.37 for ; Mon, 14 Mar 2011 06:16:43 -0700 (PDT) Received: by 10.90.61.15 with SMTP id j15mr3149384aga.101.1300108603077; Mon, 14 Mar 2011 06:16:43 -0700 (PDT) Received: from localhost.localdomain ([114.216.146.145]) by mx.google.com with ESMTPS id d14sm6011637ana.0.2011.03.14.06.16.38 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 14 Mar 2011 06:16:42 -0700 (PDT) From: Shawn Guo To: devicetree-discuss@lists.ozlabs.org, linaro-dev@lists.linaro.org Cc: patches@linaro.org, Shawn Guo Subject: [PATCH 4/5] arm/dt: mx5: change timer init function to dt clock way Date: Mon, 14 Mar 2011 21:18:41 +0800 Message-Id: <1300108722-3254-5-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> 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 19c60a4..45d1e37 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 = {