Commit ade741b3 authored by Stefan Roese's avatar Stefan Roese Committed by Luka Perkov

arm: mvebu: Call timer_init early before PHY and DDR init

Without calling timer_init(), the xdelay() functions return immediately.
We need to call timer_init() early, so that these functions work and
the PHY and DDR init code works correctly.
Signed-off-by: default avatarStefan Roese <>
Cc: Anton Schubert <>
Cc: Luka Perkov <>
parent e863f7f0
......@@ -28,6 +28,8 @@ void board_init_f(ulong dummy)
/* First init the serdes PHY's */
......@@ -41,6 +41,8 @@
#define timestamp gd->arch.tbl
#define lastdec gd->arch.lastinc
static int init_done;
/* Timer reload and current value registers */
struct kwtmr_val {
u32 reload; /* Timer reload reg */
......@@ -112,6 +114,11 @@ void __udelay(unsigned long usec)
int timer_init(void)
/* Only init the timer once */
if (init_done)
return 0;
init_done = 1;
/* load value into timer */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment