* [U-Boot] [PATCH v2] MX51EVK: fix return value of get_timer_masked
@ 2010-08-10 6:18 Li Haibo
2010-08-10 7:59 ` Stefano Babic
0 siblings, 1 reply; 2+ messages in thread
From: Li Haibo @ 2010-08-10 6:18 UTC (permalink / raw)
To: u-boot
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>
---
v2: resend without "base-64 encoded".
arch/arm/cpu/arm_cortexa8/mx51/timer.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/cpu/arm_cortexa8/mx51/timer.c b/arch/arm/cpu/arm_cortexa8/mx51/timer.c
index 81c4a06..110edbf 100644
--- a/arch/arm/cpu/arm_cortexa8/mx51/timer.c
+++ b/arch/arm/cpu/arm_cortexa8/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)
--
1.6.5.2
--
This e-mail and its attachments contain confidential information from
Shenzhen CASTEL Wireless Telecommunications Co., Ltd.,
Which is intended only for the person or entity whose address is listed above.
Any use of theinformation contained herein in any way (Including,
but not limited to, total or partial disclosure,reproduction,
or dissemination) by persons other than the Intended recipient(s) is prohibited.
If you receive this e-mail in error, please notify the sender
by phone or email immediately and delete it!
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH v2] MX51EVK: fix return value of get_timer_masked
2010-08-10 6:18 [U-Boot] [PATCH v2] MX51EVK: fix return value of get_timer_masked Li Haibo
@ 2010-08-10 7:59 ` Stefano Babic
0 siblings, 0 replies; 2+ messages in thread
From: Stefano Babic @ 2010-08-10 7:59 UTC (permalink / raw)
To: u-boot
Li Haibo wrote:
> 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>
> ---
> v2: resend without "base-64 encoded".
>
> arch/arm/cpu/arm_cortexa8/mx51/timer.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/cpu/arm_cortexa8/mx51/timer.c b/arch/arm/cpu/arm_cortexa8/mx51/timer.c
> index 81c4a06..110edbf 100644
> --- a/arch/arm/cpu/arm_cortexa8/mx51/timer.c
> +++ b/arch/arm/cpu/arm_cortexa8/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)
Applied to u-boot-imx, thanks.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-10 7:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-10 6:18 [U-Boot] [PATCH v2] MX51EVK: fix return value of get_timer_masked Li Haibo
2010-08-10 7:59 ` Stefano Babic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox