omap-common/hwinit-common.c: timer_init() doesn't need to touch gd
authorTom Rini <trini@ti.com>
Fri, 19 Dec 2014 21:52:55 +0000 (16:52 -0500)
committerTom Rini <trini@ti.com>
Mon, 5 Jan 2015 20:13:45 +0000 (15:13 -0500)
The gd will be cleared at first so we don't need to set arch.tbl to 0.
In addition, the checks later against lastinc also work fine with an
initial value of 0 here.  This also brings us in line with sunxi code
for example.

Signed-off-by: Tom Rini <trini@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/arm/cpu/armv7/omap-common/timer.c

index 7c9924dc39ce1076a43c6ae620f66c06123ac10f..032bd2c24fdddb95705096ddc94c692f6b2fa735 100644 (file)
@@ -41,11 +41,6 @@ int timer_init(void)
        writel((CONFIG_SYS_PTV << 2) | TCLR_PRE | TCLR_AR | TCLR_ST,
                &timer_base->tclr);
 
-       /* reset time, capture current incrementer value time */
-       gd->arch.lastinc = readl(&timer_base->tcrr) /
-                                       (TIMER_CLOCK / CONFIG_SYS_HZ);
-       gd->arch.tbl = 0;       /* start "advancing" time stamp from 0 */
-
        return 0;
 }