linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 04/11] ARM: vexpress: use new init_early for clock tree and sched_clock init
Date: Thu, 27 Jan 2011 13:47:07 +0000	[thread overview]
Message-ID: <E1PiSBn-0003p5-8C@rmk-PC.arm.linux.org.uk> (raw)
In-Reply-To: <20110127134532.GE25968@n2100.arm.linux.org.uk>

Initialize the clock tree and our sched_clock() early.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-vexpress/core.h     |    1 +
 arch/arm/mach-vexpress/ct-ca9x4.c |   10 ++++++++--
 arch/arm/mach-vexpress/v2m.c      |    6 ++++--
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-vexpress/core.h b/arch/arm/mach-vexpress/core.h
index 362780d..e0312a1 100644
--- a/arch/arm/mach-vexpress/core.h
+++ b/arch/arm/mach-vexpress/core.h
@@ -21,4 +21,5 @@ struct amba_device name##_device = {		\
 struct map_desc;
 
 void v2m_map_io(struct map_desc *tile, size_t num);
+void v2m_init_early(void);
 extern struct sys_timer v2m_timer;
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c
index 27baed1..ff48ebc 100644
--- a/arch/arm/mach-vexpress/ct-ca9x4.c
+++ b/arch/arm/mach-vexpress/ct-ca9x4.c
@@ -180,6 +180,13 @@ static struct platform_device pmu_device = {
 	.resource	= pmu_resources,
 };
 
+static void __init ct_ca9x4_init_early(void)
+{
+	clkdev_add_table(lookups, ARRAY_SIZE(lookups));
+
+	v2m_init_early();
+}
+
 static void __init ct_ca9x4_init(void)
 {
 	int i;
@@ -194,8 +201,6 @@ static void __init ct_ca9x4_init(void)
 	l2x0_init(l2x0_base, 0x00400000, 0xfe0fffff);
 #endif
 
-	clkdev_add_table(lookups, ARRAY_SIZE(lookups));
-
 	for (i = 0; i < ARRAY_SIZE(ct_ca9x4_amba_devs); i++)
 		amba_device_register(ct_ca9x4_amba_devs[i], &iomem_resource);
 
@@ -206,6 +211,7 @@ MACHINE_START(VEXPRESS, "ARM-Versatile Express CA9x4")
 	.boot_params	= PHYS_OFFSET + 0x00000100,
 	.map_io		= ct_ca9x4_map_io,
 	.init_irq	= ct_ca9x4_init_irq,
+	.init_early	= ct_ca9x4_init_early,
 #if 0
 	.timer		= &ct_ca9x4_timer,
 #else
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index f35d646..63ef663 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -49,13 +49,15 @@ void __init v2m_map_io(struct map_desc *tile, size_t num)
 	iotable_init(tile, num);
 }
 
+void __init v2m_init_early(void)
+{
+	versatile_sched_clock_init(MMIO_P2V(V2M_SYS_24MHZ), 24000000);
+}
 
 static void __init v2m_timer_init(void)
 {
 	u32 scctrl;
 
-	versatile_sched_clock_init(MMIO_P2V(V2M_SYS_24MHZ), 24000000);
-
 	/* Select 1MHz TIMCLK as the reference clock for SP804 timers */
 	scctrl = readl(MMIO_P2V(V2M_SYSCTL + SCCTRL));
 	scctrl |= SCCTRL_TIMEREN0SEL_TIMCLK;
-- 
1.6.2.5

  parent reply	other threads:[~2011-01-27 13:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-27 13:45 [PATCH 00/11] Rationalize and consolidate ARMs evaluation boards Russell King - ARM Linux
2011-01-27 13:46 ` [PATCH 01/11] ARM: integrator: use new init_early for clock tree init Russell King - ARM Linux
2011-02-04 19:27   ` Rob Herring
2011-02-04 19:31     ` Grant Likely
2011-02-04 19:34     ` Russell King - ARM Linux
2011-02-04 19:53       ` Rob Herring
2011-02-04 19:59         ` Russell King - ARM Linux
2011-01-27 13:46 ` [PATCH 02/11] ARM: versatile: use new init_early for clock tree and sched_clock init Russell King - ARM Linux
2011-01-27 13:46 ` [PATCH 03/11] ARM: realview: " Russell King - ARM Linux
2011-01-27 13:47 ` Russell King - ARM Linux [this message]
2011-01-27 13:47 ` [PATCH 05/11] ARM: versatile: remove old AMBA device DMA definitions Russell King - ARM Linux
2011-01-27 13:47 ` [PATCH 06/11] ARM: realview: " Russell King - ARM Linux
2011-01-27 14:40   ` Linus Walleij
2011-01-27 13:48 ` [PATCH 07/11] ARM: rationalize versatile family Kconfig/Makefile Russell King - ARM Linux
2011-01-27 13:48 ` [PATCH 08/11] ARM: integrator/versatile: consolidate FPGA IRQ handling code Russell King - ARM Linux
2011-01-27 13:48 ` [PATCH 09/11] ARM: realview/vexpress: consolidate localtimer support Russell King - ARM Linux
2011-01-27 13:49 ` [PATCH 10/11] ARM: realview/vexpress: consolidate SMP bringup code Russell King - ARM Linux
2011-01-27 13:49 ` [PATCH 11/11] ARM: integrator: add Integrator/CP sched_clock support Russell King - ARM Linux
2011-02-18 11:34 ` [PATCH 00/11] Rationalize and consolidate ARMs evaluation boards Catalin Marinas

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=E1PiSBn-0003p5-8C@rmk-PC.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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;
as well as URLs for NNTP newsgroup(s).