From: Daniel Gorsulowski Date: Mon, 6 Jun 2016 07:40:11 +0000 (+0200) Subject: omap3: bugfix in timer on rollover X-Git-Tag: v2016.07-rc3~56 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=85a2f772c256af9d8f0570548d2c2041a7b461e9;p=u-boot omap3: bugfix in timer on rollover Signed-off-by: Daniel Gorsulowski --- diff --git a/arch/arm/cpu/armv7/omap-common/timer.c b/arch/arm/cpu/armv7/omap-common/timer.c index 032bd2c24f..49e3a971d9 100644 --- a/arch/arm/cpu/armv7/omap-common/timer.c +++ b/arch/arm/cpu/armv7/omap-common/timer.c @@ -77,7 +77,7 @@ ulong get_timer_masked(void) /* move stamp fordward with absoulte diff ticks */ gd->arch.tbl += (now - gd->arch.lastinc); } else { /* we have rollover of incrementer */ - gd->arch.tbl += ((TIMER_LOAD_VAL / (TIMER_CLOCK / + gd->arch.tbl += ((TIMER_OVERFLOW_VAL / (TIMER_CLOCK / CONFIG_SYS_HZ)) - gd->arch.lastinc) + now; } gd->arch.lastinc = now;