提交 51b5870b 编写于 作者: L Li Haibo 提交者: Stefano Babic

MX51EVK: fix return value of get_timer_masked

get_timer_masked() should return current timestamp,
not current ticks from hardware register.

Tested on one custom board with NAND flash.
Without this patch, NAND write always TIMEOUT
because get_timer(0) return a big value.

This patch applies for u-boot-2010.06
Signed-off-by: NLi Haibo <hbli@sinocastel.com>
上级 a9804be8
......@@ -89,7 +89,7 @@ ulong get_timer_masked(void)
timestamp += ((0xFFFFFFFF / (CONFIG_MX51_CLK32 / CONFIG_SYS_HZ))
- lastinc) + val;
lastinc = val;
return val;
return timestamp;
}
ulong get_timer(ulong base)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册