Message ID | 7d0a14d713a81ffe893285a30d195fc0b5c39d7d.1531377838.git.michal.simek@xilinx.com |
---|---|
State | Accepted |
Commit | 35670665d6b6176566b5701c078d5103c1ec4c86 |
Delegated to: | Michal Simek |
Headers | show |
Series | [U-Boot,v2] microblaze: Do not call timer init that early | expand |
On 12 July 2018 at 00:44, Michal Simek <michal.simek@xilinx.com> wrote: > 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 <michal.simek@xilinx.com> > --- > > Changes in v2: > - Do not add new ifdef to board_f and use GD_FLG_RELOC instead - > reported-by sjg > - Change commit message > > arch/microblaze/cpu/timer.c | 4 ++++ > 1 file changed, 4 insertions(+) Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/arch/microblaze/cpu/timer.c b/arch/microblaze/cpu/timer.c index ef229023bf08..58e5c3075085 100644 --- a/arch/microblaze/cpu/timer.c +++ b/arch/microblaze/cpu/timer.c @@ -51,6 +51,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) {
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 <michal.simek@xilinx.com> --- Changes in v2: - Do not add new ifdef to board_f and use GD_FLG_RELOC instead - reported-by sjg - Change commit message arch/microblaze/cpu/timer.c | 4 ++++ 1 file changed, 4 insertions(+)