* [U-Boot] [patch] i.mx change get_timer(base) to return time since base
@ 2008-08-26 23:51 Andrew Dyer
0 siblings, 0 replies; only message in thread
From: Andrew Dyer @ 2008-08-26 23:51 UTC (permalink / raw)
To: u-boot
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@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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-08-26 23:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-26 23:51 [U-Boot] [patch] i.mx change get_timer(base) to return time since base Andrew Dyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox