summaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2014-01-27 10:41:59 +0100
committerMichal Simek <michal.simek@xilinx.com>2014-01-27 11:26:31 +0100
commit03fe0d3c27ed37d936eaa61e10ce56f8b15361a7 (patch)
tree0c589f2628062a2af732d699665a987778351634 /arch/microblaze/kernel
parent839396ab88e4ac0107a88cb85fa59a7ec3f94416 (diff)
downloadblackbird-op-linux-03fe0d3c27ed37d936eaa61e10ce56f8b15361a7.tar.gz
blackbird-op-linux-03fe0d3c27ed37d936eaa61e10ce56f8b15361a7.zip
microblaze: timer: Do not initialized system timer twice
Only one system timer can be setup. Do not initialize more system timers. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'arch/microblaze/kernel')
-rw-r--r--arch/microblaze/kernel/timer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c
index 06609e01f1cf..fb0c61443f19 100644
--- a/arch/microblaze/kernel/timer.c
+++ b/arch/microblaze/kernel/timer.c
@@ -230,9 +230,15 @@ static int __init xilinx_clocksource_init(void)
static void __init xilinx_timer_init(struct device_node *timer)
{
struct clk *clk;
+ static int initialized;
u32 irq;
u32 timer_num = 1;
+ if (initialized)
+ return;
+
+ initialized = 1;
+
timer_baseaddr = of_iomap(timer, 0);
if (!timer_baseaddr) {
pr_err("ERROR: invalid timer base address\n");
OpenPOWER on IntegriCloud