From: Mike Frysinger Date: Mon, 23 May 2011 23:42:34 -0400 Subject: [U-Boot] [RFC] Review of U-Boot timer API In-Reply-To: <4DD7B245.5000008@gmail.com> References: <4DD7B245.5000008@gmail.com> Message-ID: <201105232342.35592.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Saturday, May 21, 2011 08:38:29 Graeme Russ wrote: > NOTE: http://lists.denx.de/pipermail/u-boot/2010-June/073024.html appears > to imply the following implementation of get_timer() is wrong: > > ulong get_timer(ulong base) > { > return get_timer_masked() - base; > } while this specific code might be wrong due to assumed timer rollover behavior, i think the code is wrong to ignore "base" completely. but maybe it doesnt matter after we rewrite things :). > blackfin > - Provides a 64-bit get_ticks() which simply returns 32-bit get_timer(0) seems to me that most arches do this > - get_usec_timer_64() could offer a longer period (584942 years!) if the hardware can support that large of a timer ... otherwise, i'd love to see the whole timer API reduced to just get_timer() and a proper doc/README.timer written. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20110523/866118e4/attachment.pgp