From patchwork Mon Mar 7 16:22:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 410 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:42:26 -0000 Delivered-To: patches@linaro.org Received: by 10.224.60.68 with SMTP id o4cs107068qah; Mon, 7 Mar 2011 08:20:38 -0800 (PST) Received: by 10.42.158.130 with SMTP id h2mr3678821icx.237.1299514838577; Mon, 07 Mar 2011 08:20:38 -0800 (PST) Received: from mail-pv0-f178.google.com (mail-pv0-f178.google.com [74.125.83.178]) by mx.google.com with ESMTPS id v19si1222291vds.9.2011.03.07.08.20.38 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 Mar 2011 08:20:38 -0800 (PST) Received-SPF: neutral (google.com: 74.125.83.178 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) client-ip=74.125.83.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.83.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-pv0-f178.google.com with SMTP id 7so1107898pvg.37 for ; Mon, 07 Mar 2011 08:20:38 -0800 (PST) Received: by 10.142.245.10 with SMTP id s10mr2471213wfh.423.1299514837903; Mon, 07 Mar 2011 08:20:37 -0800 (PST) Received: from localhost.localdomain ([114.216.147.253]) by mx.google.com with ESMTPS id w11sm4629111wfh.6.2011.03.07.08.20.30 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 Mar 2011 08:20:37 -0800 (PST) From: Shawn Guo To: linaro-dev@lists.linaro.org, devicetree-discuss@lists.ozlabs.org Cc: patches@linaro.org, Shawn Guo Subject: [PATCH 4/5] arm/dt: mx5: change timer init function to dt clock way Date: Tue, 8 Mar 2011 00:22:11 +0800 Message-Id: <1299514932-13558-5-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1299514932-13558-1-git-send-email-shawn.guo@linaro.org> References: <1299514932-13558-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 90593f5..6b2f11b 100644 --- a/arch/arm/mach-mx5/board-dt.c +++ b/arch/arm/mach-mx5/board-dt.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -41,8 +42,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 = {