From mboxrd@z Thu Jan 1 00:00:00 1970 From: 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> References: <1300108722-3254-1-git-send-email-shawn.guo@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1300108722-3254-1-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, linaro-dev-cunTk1MwBs8s++Sfvej+rw@public.gmane.org Cc: patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org List-Id: devicetree@vger.kernel.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 = { -- 1.7.1