From 274737e5eb25b2bcd3af3a96da923effd543284f Mon Sep 17 00:00:00 2001
From: Andrew Dyer <adyer@righthandtech.com>
Date: Fri, 12 Sep 2008 02:20:46 +0200
Subject: [PATCH] i.mx change get_timer(base) to return time since base

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpu/arm920t/imx/interrupts.c b/cpu/arm920t/imx/interrupts.c
index 03ce06d35ab..c61d3bc29ce 100644
--- a/cpu/arm920t/imx/interrupts.c
+++ b/cpu/arm920t/imx/interrupts.c
@@ -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)
-- 
GitLab