public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] sa1100 change get_timer(base) to return time since base
@ 2010-05-16 17:35 Jochen Friedrich
  2010-06-01 14:53 ` Kristoffer Ericson
  2010-06-22 21:29 ` Wolfgang Denk
  0 siblings, 2 replies; 10+ messages in thread
From: Jochen Friedrich @ 2010-05-16 17:35 UTC (permalink / raw)
  To: u-boot

similar to 274737e5eb25b2bcd3af3a96da923effd543284f

This patch changes get_timer() for sa1100 to return the time since
'base' instead of the time since the counter was at zero.

Symptom seen is flash timeout errors when erasing or programming a
sector using the common cfi flash code.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
 arch/arm/cpu/sa1100/timer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/cpu/sa1100/timer.c b/arch/arm/cpu/sa1100/timer.c
index 0207501..aea90ab 100644
--- a/arch/arm/cpu/sa1100/timer.c
+++ b/arch/arm/cpu/sa1100/timer.c
@@ -41,7 +41,7 @@ void reset_timer (void)
 
 ulong get_timer (ulong base)
 {
-	return get_timer_masked ();
+	return get_timer_masked () - base;
 }
 
 void set_timer (ulong t)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [U-Boot] [PATCH] sa1100 change get_timer(base) to return time since base
@ 2010-04-02 16:23 Jochen Friedrich
  0 siblings, 0 replies; 10+ messages in thread
From: Jochen Friedrich @ 2010-04-02 16:23 UTC (permalink / raw)
  To: u-boot

similar to 274737e5eb25b2bcd3af3a96da923effd543284f

This patch changes get_timer() for sa1100 to return the time since
'base' instead of the time since the counter was at zero.

Symptom seen is flash timeout errors when erasing or programming a
sector using the common cfi flash code.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
 cpu/sa1100/timer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cpu/sa1100/timer.c b/cpu/sa1100/timer.c
index 0207501..aea90ab 100644
--- a/cpu/sa1100/timer.c
+++ b/cpu/sa1100/timer.c
@@ -41,7 +41,7 @@ void reset_timer (void)
 
 ulong get_timer (ulong base)
 {
-	return get_timer_masked ();
+	return get_timer_masked () - base;
 }
 
 void set_timer (ulong t)
-- 
1.7.0.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-06-28 19:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-16 17:35 [U-Boot] [PATCH] sa1100 change get_timer(base) to return time since base Jochen Friedrich
2010-06-01 14:53 ` Kristoffer Ericson
2010-06-02 10:34   ` Jochen Friedrich
2010-06-02 12:35     ` Kristoffer Ericson
2010-06-15 20:07     ` Kristoffer Ericson
2010-06-22 21:29 ` Wolfgang Denk
2010-06-22 22:09   ` Andrew Dyer
2010-06-22 22:34     ` Wolfgang Denk
2010-06-28 19:41     ` Jochen Friedrich
  -- strict thread matches above, loose matches on Subject: below --
2010-04-02 16:23 Jochen Friedrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox