diff options
Diffstat (limited to 'arch/arm/mach-vexpress/v2m.c')
-rw-r--r-- | arch/arm/mach-vexpress/v2m.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 915683cb67d6..9366f37902d9 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/amba/bus.h> | 5 | #include <linux/amba/bus.h> |
6 | #include <linux/amba/mmci.h> | 6 | #include <linux/amba/mmci.h> |
7 | #include <linux/io.h> | 7 | #include <linux/io.h> |
8 | #include <linux/clocksource.h> | ||
8 | #include <linux/smp.h> | 9 | #include <linux/smp.h> |
9 | #include <linux/init.h> | 10 | #include <linux/init.h> |
10 | #include <linux/irqchip.h> | 11 | #include <linux/irqchip.h> |
@@ -21,11 +22,12 @@ | |||
21 | #include <linux/regulator/fixed.h> | 22 | #include <linux/regulator/fixed.h> |
22 | #include <linux/regulator/machine.h> | 23 | #include <linux/regulator/machine.h> |
23 | #include <linux/vexpress.h> | 24 | #include <linux/vexpress.h> |
25 | #include <linux/clk-provider.h> | ||
26 | #include <linux/clkdev.h> | ||
24 | 27 | ||
25 | #include <asm/arch_timer.h> | 28 | #include <asm/arch_timer.h> |
26 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
27 | #include <asm/sizes.h> | 30 | #include <asm/sizes.h> |
28 | #include <asm/smp_twd.h> | ||
29 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
30 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
31 | #include <asm/mach/time.h> | 33 | #include <asm/mach/time.h> |
@@ -361,8 +363,6 @@ static void __init v2m_init(void) | |||
361 | for (i = 0; i < ARRAY_SIZE(v2m_amba_devs); i++) | 363 | for (i = 0; i < ARRAY_SIZE(v2m_amba_devs); i++) |
362 | amba_device_register(v2m_amba_devs[i], &iomem_resource); | 364 | amba_device_register(v2m_amba_devs[i], &iomem_resource); |
363 | 365 | ||
364 | pm_power_off = vexpress_power_off; | ||
365 | |||
366 | ct_desc->init_tile(); | 366 | ct_desc->init_tile(); |
367 | } | 367 | } |
368 | 368 | ||
@@ -374,7 +374,6 @@ MACHINE_START(VEXPRESS, "ARM-Versatile Express") | |||
374 | .init_irq = v2m_init_irq, | 374 | .init_irq = v2m_init_irq, |
375 | .init_time = v2m_timer_init, | 375 | .init_time = v2m_timer_init, |
376 | .init_machine = v2m_init, | 376 | .init_machine = v2m_init, |
377 | .restart = vexpress_restart, | ||
378 | MACHINE_END | 377 | MACHINE_END |
379 | 378 | ||
380 | static struct map_desc v2m_rs1_io_desc __initdata = { | 379 | static struct map_desc v2m_rs1_io_desc __initdata = { |
@@ -433,20 +432,24 @@ static void __init v2m_dt_timer_init(void) | |||
433 | { | 432 | { |
434 | struct device_node *node = NULL; | 433 | struct device_node *node = NULL; |
435 | 434 | ||
436 | vexpress_clk_of_init(); | 435 | of_clk_init(NULL); |
437 | 436 | ||
437 | clocksource_of_init(); | ||
438 | do { | 438 | do { |
439 | node = of_find_compatible_node(node, NULL, "arm,sp804"); | 439 | node = of_find_compatible_node(node, NULL, "arm,sp804"); |
440 | } while (node && vexpress_get_site_by_node(node) != VEXPRESS_SITE_MB); | 440 | } while (node && vexpress_get_site_by_node(node) != VEXPRESS_SITE_MB); |
441 | if (node) { | 441 | if (node) { |
442 | pr_info("Using SP804 '%s' as a clock & events source\n", | 442 | pr_info("Using SP804 '%s' as a clock & events source\n", |
443 | node->full_name); | 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")); | ||
444 | v2m_sp804_init(of_iomap(node, 0), | 448 | v2m_sp804_init(of_iomap(node, 0), |
445 | irq_of_parse_and_map(node, 0)); | 449 | irq_of_parse_and_map(node, 0)); |
446 | } | 450 | } |
447 | 451 | ||
448 | if (arch_timer_of_register() != 0) | 452 | arch_timer_of_register(); |
449 | twd_local_timer_of_register(); | ||
450 | 453 | ||
451 | if (arch_timer_sched_clock_init() != 0) | 454 | if (arch_timer_sched_clock_init() != 0) |
452 | versatile_sched_clock_init(vexpress_get_24mhz_clock_base(), | 455 | versatile_sched_clock_init(vexpress_get_24mhz_clock_base(), |
@@ -464,7 +467,6 @@ static void __init v2m_dt_init(void) | |||
464 | { | 467 | { |
465 | l2x0_of_init(0x00400000, 0xfe0fffff); | 468 | l2x0_of_init(0x00400000, 0xfe0fffff); |
466 | of_platform_populate(NULL, v2m_dt_bus_match, NULL, NULL); | 469 | of_platform_populate(NULL, v2m_dt_bus_match, NULL, NULL); |
467 | pm_power_off = vexpress_power_off; | ||
468 | } | 470 | } |
469 | 471 | ||
470 | static const char * const v2m_dt_match[] __initconst = { | 472 | static const char * const v2m_dt_match[] __initconst = { |
@@ -481,5 +483,4 @@ DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express") | |||
481 | .init_irq = irqchip_init, | 483 | .init_irq = irqchip_init, |
482 | .init_time = v2m_dt_timer_init, | 484 | .init_time = v2m_dt_timer_init, |
483 | .init_machine = v2m_dt_init, | 485 | .init_machine = v2m_dt_init, |
484 | .restart = vexpress_restart, | ||
485 | MACHINE_END | 486 | MACHINE_END |