From ad6b6e11f916017a858618cff63e9ad6b0bfa553 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 12 Dec 2011 14:02:47 +0100 Subject: [PATCH] --- yaml --- r: 331449 b: refs/heads/master c: 88d23b4462c9c9b8c8876d60f5b57d39b53c6227 h: refs/heads/master i: 331447: da4ed3e9e4c241bec2d172aab2e44481b241b9db v: v3 --- [refs] | 2 +- trunk/arch/microblaze/kernel/timer.c | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 9327e2cb1cd0..3f81f7f6cb22 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9998517a2789850e4e48bad6ada4de1f6c5a760d +refs/heads/master: 88d23b4462c9c9b8c8876d60f5b57d39b53c6227 diff --git a/trunk/arch/microblaze/kernel/timer.c b/trunk/arch/microblaze/kernel/timer.c index 522defa7d41f..edd3f835e7df 100644 --- a/trunk/arch/microblaze/kernel/timer.c +++ b/trunk/arch/microblaze/kernel/timer.c @@ -257,7 +257,15 @@ void __init time_init(void) 0 }; #endif - timer = of_find_compatible_node(NULL, NULL, "xlnx,xps-timer-1.00.a"); + prop = of_get_property(of_chosen, "system-timer", NULL); + if (prop) + timer = of_find_node_by_phandle(be32_to_cpup(prop)); + else + pr_info("No chosen timer found, using default\n"); + + if (!timer) + timer = of_find_compatible_node(NULL, NULL, + "xlnx,xps-timer-1.00.a"); BUG_ON(!timer); timer_baseaddr = be32_to_cpup(of_get_property(timer, "reg", NULL));