mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-26 14:40:41 +00:00
armv7: timer: init timer with bootstage
In initf_bootstage() we call bootstage_mark_name() which ends up calling
timer_get_us() before timer_init(); that cause crash for stm32mp1.
This patch solve the issue without changing the initialization sequence.
See also commit 97d20f69f5
("Enable CONFIG_TIMER_EARLY with bootstage")
for other solution when DM is activated for TIMER.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
This commit is contained in:
parent
3419982bc3
commit
c596877ee6
1 changed files with 3 additions and 0 deletions
|
@ -49,6 +49,9 @@ unsigned long long get_ticks(void)
|
|||
|
||||
ulong timer_get_boot_us(void)
|
||||
{
|
||||
if (!gd->arch.timer_rate_hz)
|
||||
timer_init();
|
||||
|
||||
return lldiv(get_ticks(), gd->arch.timer_rate_hz / 1000000);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue