[U-Boot] [patch] i.mx change get_timer(base) to return time since base
Andrew Dyer
adyer at righthandtech.com
Wed Aug 27 01:51:07 CEST 2008
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 <adyer at righthandtech.com>
---
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
More information about the U-Boot
mailing list