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>
diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c
index 06609e0..fb0c6144 100644
--- a/arch/microblaze/kernel/timer.c
+++ b/arch/microblaze/kernel/timer.c
@@ -230,9 +230,15 @@
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");