]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
i.mx change get_timer(base) to return time since base
authorAndrew Dyer <adyer@righthandtech.com>
Fri, 12 Sep 2008 00:20:46 +0000 (02:20 +0200)
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Fri, 12 Sep 2008 00:20:46 +0000 (02:20 +0200)
This patch changes get_timer() for i.MX 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: Andrew Dyer <adyer@righthandtech.com>
cpu/arm920t/imx/interrupts.c

index 03ce06d35abd037ea61b4ab866a002ec082af73e..c61d3bc29cebc8e8a75701173b9ffd80b285978f 100644 (file)
@@ -60,7 +60,7 @@ void reset_timer (void)
 
 ulong get_timer (ulong base)
 {
-       return get_timer_masked ();
+       return get_timer_masked() - base;
 }
 
 void set_timer (ulong t)