From 88050555540065e6b76da4b4a30e9fdd4b57ec29 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 11 Jul 2018 14:08:26 +0200 Subject: [PATCH] microblaze: Do not call timer init that early Timer needs to be converted to DM but as of now it can't be called so early because intc controller is not ready. Call it later in board_r.c. Before this patch timer_init is called twice which is wrong. The patch is blocking initialization before relocation. Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- arch/microblaze/cpu/timer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/microblaze/cpu/timer.c b/arch/microblaze/cpu/timer.c index 8845e07d0e8..351d3ced044 100644 --- a/arch/microblaze/cpu/timer.c +++ b/arch/microblaze/cpu/timer.c @@ -52,6 +52,10 @@ int timer_init (void) debug("TIMER: Initialization\n"); + /* Do not init before relocation */ + if (!(gd->flags & GD_FLG_RELOC)) + return 0; + node = fdt_node_offset_by_compatible(blob, node, "xlnx,xps-timer-1.00.a"); if (node != -1) { -- 2.47.3