提交 b3107928 编写于 作者: T Tom Rini

omap-common/hwinit-common.c: timer_init() doesn't need to touch gd

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: NTom Rini <trini@ti.com>
Reviewed-by: NSimon Glass <sjg@chromium.org>
上级 b352dde1
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册