aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-vexpress/v2m.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-vexpress/v2m.c')
-rw-r--r--arch/arm/mach-vexpress/v2m.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index 9366f37902d9..b6083bb1eb8c 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -1,6 +1,7 @@
1/* 1/*
2 * Versatile Express V2M Motherboard Support 2 * Versatile Express V2M Motherboard Support
3 */ 3 */
4#include <linux/clocksource.h>
4#include <linux/device.h> 5#include <linux/device.h>
5#include <linux/amba/bus.h> 6#include <linux/amba/bus.h>
6#include <linux/amba/mmci.h> 7#include <linux/amba/mmci.h>
@@ -25,7 +26,6 @@
25#include <linux/clk-provider.h> 26#include <linux/clk-provider.h>
26#include <linux/clkdev.h> 27#include <linux/clkdev.h>
27 28
28#include <asm/arch_timer.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/sizes.h> 30#include <asm/sizes.h>
31#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
@@ -63,9 +63,6 @@ static void __init v2m_sp804_init(void __iomem *base, unsigned int irq)
63 if (WARN_ON(!base || irq == NO_IRQ)) 63 if (WARN_ON(!base || irq == NO_IRQ))
64 return; 64 return;
65 65
66 writel(0, base + TIMER_1_BASE + TIMER_CTRL);
67 writel(0, base + TIMER_2_BASE + TIMER_CTRL);
68
69 sp804_clocksource_init(base + TIMER_2_BASE, "v2m-timer1"); 66 sp804_clocksource_init(base + TIMER_2_BASE, "v2m-timer1");
70 sp804_clockevents_init(base + TIMER_1_BASE, irq, "v2m-timer0"); 67 sp804_clockevents_init(base + TIMER_1_BASE, irq, "v2m-timer0");
71} 68}
@@ -430,29 +427,11 @@ void __init v2m_dt_init_early(void)
430 427
431static void __init v2m_dt_timer_init(void) 428static void __init v2m_dt_timer_init(void)
432{ 429{
433 struct device_node *node = NULL;
434
435 of_clk_init(NULL); 430 of_clk_init(NULL);
436 431
437 clocksource_of_init(); 432 clocksource_of_init();
438 do {
439 node = of_find_compatible_node(node, NULL, "arm,sp804");
440 } while (node && vexpress_get_site_by_node(node) != VEXPRESS_SITE_MB);
441 if (node) {
442 pr_info("Using SP804 '%s' as a clock & events source\n",
443 node->full_name);
444 WARN_ON(clk_register_clkdev(of_clk_get_by_name(node,
445 "timclken1"), "v2m-timer0", "sp804"));
446 WARN_ON(clk_register_clkdev(of_clk_get_by_name(node,
447 "timclken2"), "v2m-timer1", "sp804"));
448 v2m_sp804_init(of_iomap(node, 0),
449 irq_of_parse_and_map(node, 0));
450 }
451
452 arch_timer_of_register();
453 433
454 if (arch_timer_sched_clock_init() != 0) 434 versatile_sched_clock_init(vexpress_get_24mhz_clock_base(),
455 versatile_sched_clock_init(vexpress_get_24mhz_clock_base(),
456 24000000); 435 24000000);
457} 436}
458 437