From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Dyer Date: Tue, 26 Aug 2008 18:51:07 -0500 Subject: [U-Boot] [patch] i.mx change get_timer(base) to return time since base Message-ID: <48B496EB.9070904@righthandtech.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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. This patch has been discussed before: http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/21941 and also been done for other arm cpus: http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/12390 a quick grep shows the same problem exists for cpu/sa1100/interrupts.c, but I don't have the h/w to test it. Signed-off-by: Andrew Dyer --- cpu/arm920t/imx/interrupts.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpu/arm920t/imx/interrupts.c b/cpu/arm920t/imx/interrupts.c index 03ce06d..c61d3bc 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) -- 1.5.4.3