From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] MX51EVK: fix return value of get_timer_masked
Date: Tue, 10 Aug 2010 09:59:12 +0200 [thread overview]
Message-ID: <4C6106D0.6010005@denx.de> (raw)
In-Reply-To: <1281421118.2652.140.camel@localhost>
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
=====================================================================
prev parent reply other threads:[~2010-08-10 7:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C6106D0.6010005@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.