public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 7/7] ARM: vexpress: add smp_twd clock
Date: Wed, 12 Jan 2011 17:32:03 -0600	[thread overview]
Message-ID: <1294875123-14086-8-git-send-email-robherring2@gmail.com> (raw)
In-Reply-To: <1294875123-14086-1-git-send-email-robherring2@gmail.com>

From: Rob Herring <rob.herring@calxeda.com>

Add smp_twd clock and call twd_timer_init to enable using it.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
 arch/arm/mach-vexpress/ct-ca9x4.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c
index db4614c..62d5a2d 100644
--- a/arch/arm/mach-vexpress/ct-ca9x4.c
+++ b/arch/arm/mach-vexpress/ct-ca9x4.c
@@ -53,9 +53,6 @@ static struct map_desc ct_ca9x4_io_desc[] __initdata = {
 
 static void __init ct_ca9x4_map_io(void)
 {
-#ifdef CONFIG_LOCAL_TIMERS
-	twd_base = MMIO_P2V(A9_MPCORE_TWD);
-#endif
 	v2m_map_io(ct_ca9x4_io_desc, ARRAY_SIZE(ct_ca9x4_io_desc));
 }
 
@@ -183,10 +180,17 @@ static struct clk osc1_clk = {
 	.rate	= 24000000,
 };
 
+static struct clk twd_clk = {
+	.rate	= 200000000,
+};
+
 static struct clk_lookup lookups[] = {
 	{	/* CLCD */
 		.dev_id		= "ct:clcd",
 		.clk		= &osc1_clk,
+	}, {	/* TWD */
+		.dev_id		= "smp_twd",
+		.clk		= &twd_clk,
 	},
 };
 
@@ -194,6 +198,10 @@ static void __init ct_ca9x4_init_early(void)
 {
 	clkdev_add_table(lookups, ARRAY_SIZE(lookups));
 	v2m_init_early();
+
+#ifdef CONFIG_LOCAL_TIMERS
+	twd_timer_init(MMIO_P2V(A9_MPCORE_TWD));
+#endif
 }
 
 static struct resource pmu_resources[] = {
-- 
1.7.1

      parent reply	other threads:[~2011-01-12 23:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-12 23:31 [PATCH 0/7] ARM: add clock api to sp804 and smp_twd timers Rob Herring
2011-01-12 23:31 ` [PATCH 1/7] ARM: integrator cp: init clocks early and add sp804 clock Rob Herring
2011-01-12 23:53   ` Russell King - ARM Linux
2011-01-12 23:31 ` [PATCH 2/7] ARM: realview: " Rob Herring
2011-01-12 23:31 ` [PATCH 3/7] ARM: versatile: " Rob Herring
2011-01-12 23:32 ` [PATCH 4/7] ARM: vexpress: " Rob Herring
2011-01-12 23:32 ` [PATCH 5/7] ARM: timer-sp: support timer clock freq other than 1MHz Rob Herring
2011-01-12 23:32 ` [PATCH 6/7] ARM: smp_twd: add clock api support Rob Herring
2011-01-12 23:32 ` Rob Herring [this message]

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=1294875123-14086-8-git-send-email-robherring2@gmail.com \
    --to=robherring2@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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