aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-vexpress
diff options
context:
space:
mode:
authorPawel Moll <pawel.moll@arm.com>2012-10-16 10:27:12 -0400
committerPawel Moll <pawel.moll@arm.com>2012-11-05 12:09:52 -0500
commit433683a66401adb0150792e725cc4f631c94de46 (patch)
treea820c2b4faddc6109e449a21b551b4a18339c287 /arch/arm/mach-vexpress
parent38669e045dbf8f62a008898a7fb1e93975b3817c (diff)
ARM: vexpress: Remove motherboard dependencies in the DTS files
The way the VE motherboard Device Trees were constructed enforced naming and structure of daughterboard files. This patch makes it possible to simply include the motherboard description anywhere in the main Device Tree and retires the "arm,v2m-timer" alias - any of the motherboard SP804 timers will be used instead. Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Diffstat (limited to 'arch/arm/mach-vexpress')
-rw-r--r--arch/arm/mach-vexpress/v2m.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index 99d4172816be..4e168e81fb42 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -446,17 +446,20 @@ static void __init v2m_dt_init_irq(void)
446 446
447static void __init v2m_dt_timer_init(void) 447static void __init v2m_dt_timer_init(void)
448{ 448{
449 struct device_node *node; 449 struct device_node *node = NULL;
450 const char *path;
451 int err;
452 450
453 vexpress_clk_of_init(); 451 vexpress_clk_of_init();
454 452
455 err = of_property_read_string(of_aliases, "arm,v2m_timer", &path); 453 do {
456 if (WARN_ON(err)) 454 node = of_find_compatible_node(node, NULL, "arm,sp804");
457 return; 455 } while (node && vexpress_get_site_by_node(node) != VEXPRESS_SITE_MB);
458 node = of_find_node_by_path(path); 456 if (node) {
459 v2m_sp804_init(of_iomap(node, 0), irq_of_parse_and_map(node, 0)); 457 pr_info("Using SP804 '%s' as a clock & events source\n",
458 node->full_name);
459 v2m_sp804_init(of_iomap(node, 0),
460 irq_of_parse_and_map(node, 0));
461 }
462
460 if (arch_timer_of_register() != 0) 463 if (arch_timer_of_register() != 0)
461 twd_local_timer_of_register(); 464 twd_local_timer_of_register();
462 465