devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: linaro-dev-cunTk1MwBs8s++Sfvej+rw@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Cc: patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
Subject: [PATCH 4/5] arm/dt: mx5: change timer init function to dt clock way
Date: Tue,  8 Mar 2011 00:22:11 +0800	[thread overview]
Message-ID: <1299514932-13558-5-git-send-email-shawn.guo@linaro.org> (raw)
In-Reply-To: <1299514932-13558-1-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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 <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
 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 <linux/dma-mapping.h>
 #include <linux/of_platform.h>
 #include <linux/of_fdt.h>
+#include <linux/clk.h>
 
 #include <mach/common.h>
 #include <mach/hardware.h>
@@ -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 = {
-- 
1.7.1

  parent reply	other threads:[~2011-03-07 16:22 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-07 16:22 [PATCH RFC 0/5] Dynamically add clk to clkdev per dt clock nodes Shawn Guo
     [not found] ` <1299514932-13558-1-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-03-07 16:22   ` [PATCH 1/5] arm/dts: babbage: add gpt and uart related " Shawn Guo
     [not found]     ` <1299514932-13558-2-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-03-07 17:48       ` Grant Likely
     [not found]         ` <AANLkTimn4fNvM0bSHnpuQmCAweTZ00JQCZCZ=vOdV4NZ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-08  3:44           ` Shawn Guo
     [not found]             ` <20110308034447.GB14370-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-03-12  5:55               ` Shawn Guo
2011-03-13  8:08               ` Shawn Guo
2011-03-08  6:56       ` Jason Hui
     [not found]         ` <AANLkTima=zGr96dZUaYvCN6oE=KCY=ySOgOLweEJYk97-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-08  7:07           ` Shawn Guo
     [not found]             ` <20110308070716.GA16642-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-03-08  7:27               ` Jason Hui
2011-03-07 16:22   ` [PATCH 2/5] arm/mxc: add clk members to ease dt clock support Shawn Guo
     [not found]     ` <1299514932-13558-3-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-03-07 17:53       ` Grant Likely
     [not found]         ` <AANLkTikZsMxs1dXgBxVEar+MLF0j4ROZO+uTmo+OSF4s-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-08  3:56           ` Shawn Guo
     [not found]             ` <20110308035633.GD14370-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-03-13 15:19               ` Shawn Guo
2011-03-15  7:41               ` Grant Likely
     [not found]                 ` <20110315074101.GH23050-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2011-03-15  7:50                   ` Shawn Guo
     [not found]                     ` <20110315075028.GG11098-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-03-15  8:02                       ` Grant Likely
     [not found]                         ` <20110315080256.GM23050-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2011-03-15  8:05                           ` Shawn Guo
2011-03-07 16:22   ` [PATCH 3/5] arm/dt: mx51: dynamically add gpt and uart related clocks per dt nodes Shawn Guo
     [not found]     ` <1299514932-13558-4-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-03-15  7:37       ` Grant Likely
     [not found]         ` <20110315073731.GG23050-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2011-03-16 12:04           ` Shawn Guo
     [not found]             ` <20110316120455.GA11658-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-03-17 20:47               ` Grant Likely
     [not found]                 ` <20110317204748.GJ12824-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2011-03-18 16:35                   ` Shawn Guo
2011-03-07 16:22   ` Shawn Guo [this message]
2011-03-07 16:22   ` [PATCH 5/5] of/clock: eliminate function __of_clk_get_from_provider Shawn Guo
  -- strict thread matches above, loose matches on Subject: below --
2011-03-14 13:18 [PATCH 0/5] add full platform dt clock support for mx51 babbage Shawn Guo
     [not found] ` <1300108722-3254-1-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-03-14 13:18   ` [PATCH 4/5] arm/dt: mx5: change timer init function to dt clock way Shawn Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1299514932-13558-5-git-send-email-shawn.guo@linaro.org \
    --to=shawn.guo-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=linaro-dev-cunTk1MwBs8s++Sfvej+rw@public.gmane.org \
    --cc=patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).