public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] PATCH: fix timer overflow in DaVinci
@ 2007-10-16 20:06 Alex Shnitman
  2007-10-16 20:46 ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Shnitman @ 2007-10-16 20:06 UTC (permalink / raw)
  To: u-boot

Hi,

The get_timer() function in DaVinci's timer.c doesn't handle overflow --
it simply subtracts the "base" from the current time, but if the timer
overflowed and the current time is smaller than base, a negative number
results. The attached patch fixes that.

The bug manifests itself e.g. when writing large blocks of flash (which
take many minutes to complete), and it so happens that a write operation
starts before the overflow and then times out prematurely because of it.

Please CC replies to me because I'm not on the list...

Regards,
--Alex
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: timer-patch.txt
Url: http://lists.denx.de/pipermail/u-boot/attachments/20071016/201e6929/attachment.txt 

^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <000001c85dc8$e5b3d730$9a4d010a@Emea.Arm.com>]

end of thread, other threads:[~2008-01-24 18:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-16 20:06 [U-Boot-Users] PATCH: fix timer overflow in DaVinci Alex Shnitman
2007-10-16 20:46 ` Wolfgang Denk
2007-10-17 16:49   ` Dirk Behme
2007-10-17 18:25     ` Wolfgang Denk
2007-10-20  6:24   ` Dirk Behme
     [not found] <000001c85dc8$e5b3d730$9a4d010a@Emea.Arm.com>
2008-01-24 18:12 ` Dirk Behme

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox