summaryrefslogtreecommitdiff
path: root/arch/arm/mach-prima2/common.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-03-19 18:27:22 +0400
committerArnd Bergmann <arnd@arndb.de>2013-03-25 15:29:41 +0400
commit275786b71d42bb54c03c15197128d7cb05d4dd8b (patch)
treef617b3c2c278798da79f832f14faa81fa57f2c6c /arch/arm/mach-prima2/common.c
parent67bdb28718ae6dbdfbfa541161529acfa0f3c137 (diff)
downloadlinux-275786b71d42bb54c03c15197128d7cb05d4dd8b.tar.xz
ARM: sirf: use clocksource_of infrastructure
This moves the two sirf clocksource drivers to drivers/clocksource and integrates them into the framework for locating the clock sources automatically. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Barry Song <Baohua.Song@csr.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/arm/mach-prima2/common.c')
-rw-r--r--arch/arm/mach-prima2/common.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c
index 31f43eac1420..4f94cd87972a 100644
--- a/arch/arm/mach-prima2/common.c
+++ b/arch/arm/mach-prima2/common.c
@@ -6,6 +6,7 @@
* Licensed under GPLv2 or later.
*/
+#include <linux/clocksource.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/irqchip.h>
@@ -31,6 +32,13 @@ void __init sirfsoc_init_late(void)
sirfsoc_pm_init();
}
+static __init void sirfsoc_init_time(void)
+{
+ /* initialize clocking early, we want to set the OS timer */
+ sirfsoc_of_clk_init();
+ clocksource_of_init();
+}
+
static __init void sirfsoc_map_io(void)
{
sirfsoc_map_lluart();
@@ -48,7 +56,7 @@ DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)")
.nr_irqs = 128,
.map_io = sirfsoc_map_io,
.init_irq = irqchip_init,
- .init_time = sirfsoc_prima2_timer_init,
+ .init_time = sirfsoc_init_time,
.init_machine = sirfsoc_mach_init,
.init_late = sirfsoc_init_late,
.dt_compat = atlas6_dt_match,
@@ -67,7 +75,7 @@ DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
.nr_irqs = 128,
.map_io = sirfsoc_map_io,
.init_irq = irqchip_init,
- .init_time = sirfsoc_prima2_timer_init,
+ .init_time = sirfsoc_init_time,
.dma_zone_size = SZ_256M,
.init_machine = sirfsoc_mach_init,
.init_late = sirfsoc_init_late,
@@ -87,7 +95,7 @@ DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)")
.smp = smp_ops(sirfsoc_smp_ops),
.map_io = sirfsoc_map_io,
.init_irq = irqchip_init,
- .init_time = sirfsoc_marco_timer_init,
+ .init_time = sirfsoc_init_time,
.init_machine = sirfsoc_mach_init,
.init_late = sirfsoc_init_late,
.dt_compat = marco_dt_match,