public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Li Haibo <hbli@sinocastel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot]  [PATCH] MX51EVK: fix return value of get_timer_masked
Date: Wed, 21 Jul 2010 20:10:12 +0800	[thread overview]
Message-ID: <1279714212.2643.32.camel@localhost> (raw)
In-Reply-To: <3DFFB0670A395946974CE996C72073241BF283C5@NDHMC4SXCH.gdc4s.com>

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>
---
 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


-- 
???
??????
???????????????
???????????2???????5?5????
Tel?+86-755-86185111-3667
Email?hbli at sinocastel.com
Website?www.sinocastel.com 

????????????????????????????????????
????????????????????????????????????
????????????????????????????????????
??????????????????
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!

  parent reply	other threads:[~2010-07-21 12:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-18 13:08 [U-Boot] Too Much Email Moran, Jack
2010-07-18 13:37 ` Wolfgang Denk
2010-07-18 14:12 ` Michelle Konzack
2010-07-19  3:48 ` "Xiangfu Liu(刘向富)"
2010-07-21 12:10 ` Li Haibo [this message]
2010-08-08 22:24   ` [U-Boot] [PATCH] MX51EVK: fix return value of get_timer_masked Wolfgang Denk
2010-08-09  9:43     ` Stefano Babic
2010-08-10  2:40       ` Li Haibo
2010-08-10  2:57       ` Li Haibo
2010-08-10  4:01         ` Xiangfu Liu
2010-08-10  5:35           ` Li Haibo
2010-08-10  5:44             ` Xiangfu Liu

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=1279714212.2643.32.camel@localhost \
    --to=hbli@sinocastel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox