
Hi,
While testing U-Boot v2015.10-rc2 on the Kirkwood-based LaCie boards I noticed that the autoboot counter is not decrementing. It stays stuck at '3' endlessly. After some digging, I found out that this regression is due to the commit: ade741b3896b1a3872ff74437f04b50762d05849 "arm: mvebu: Call timer_init early before PHY and DDR init".
With this commit it appears that the timer initialization is skipped on Kirkwood boards. As a consequence the timer is not ticking and then all the features relying on the timer are most likely broken.
On the Kirkwood boards, the timer_init function is only called from from the ARM init_sequence. SPL support is disabled. The problem is that the patch introduces a static init_done variable (to prevent multiple timer initializations). But while debugging the timer_init function (via JTAG), I noticed that the init_done initial value is not zero. So the function exists without initializing the timer. A possible explanation is that timer_init is called before the U-Boot relocation, when the BSS segment is still not available...
Maybe we should use an initialized variable instead ?
Regards,
Simon