From patchwork Fri Apr 2 16:23:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot] sa1100 change get_timer(base) to return time since base Date: Fri, 02 Apr 2010 06:23:57 -0000 From: Jochen Friedrich X-Patchwork-Id: 71735 Message-Id: <1270225437-19168-1-git-send-email-jochen@scram.de> To: u-boot@lists.denx.de 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 --- 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)