diff options
author | Li Haibo <hbli@sinocastel.com> | 2010-08-10 06:18:38 (GMT) |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2010-08-10 07:46:44 (GMT) |
commit | 51b5870bdc837359299d22e8af48f315bd65d5fd (patch) | |
tree | 5bd027070cc293e951c7fa27086e702b14a82579 /arch/arm/cpu/armv7 | |
parent | a9804be86858cf7ee3e39e6a371ecd56da517ce8 (diff) | |
download | u-boot-51b5870bdc837359299d22e8af48f315bd65d5fd.tar.xz |
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: Li Haibo <hbli@sinocastel.com>
Diffstat (limited to 'arch/arm/cpu/armv7')
-rw-r--r-- | arch/arm/cpu/armv7/mx51/timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv7/mx51/timer.c b/arch/arm/cpu/armv7/mx51/timer.c index 81c4a06..110edbf 100644 --- a/arch/arm/cpu/armv7/mx51/timer.c +++ b/arch/arm/cpu/armv7/mx51/timer.c @@ -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) |