Skip to contentSkip to conversation

sa1100 change get_timer(base) to return time since base

PATCH New Jochen Friedrich 1 participant 1 message Apr 2, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sa1100 change get_timer(base) to return time since base

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.

---
 cpu/sa1100/timer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
cpu/sa1100/timer.c +1 -1
index 0207501..aea90ab 100644
@@ -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)
Signature · 1 line
1.7.0.3