From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott McNutt Date: Wed, 25 May 2011 09:08:39 -0400 Subject: [U-Boot] [RFC] Review of U-Boot timer API In-Reply-To: <4DDCF957.4050902@gmail.com> References: <4DD7B245.5000008@gmail.com> <201105240024.26511.vapier@gentoo.org> <4DDB42B1.2010206@emk-elektronik.de> <4DDBB29D.2050102@psyent.com> <20110524141950.2AB1CCF5DBF@gemini.denx.de> <4DDBE22D.6050806@gmail.com> <4DDCF7B9.7060804@psyent.com> <4DDCF957.4050902@gmail.com> Message-ID: <4DDCFF57.1080005@psyent.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Graeme Russ wrote: > Hi Scott, > > On 25/05/11 22:36, Scott McNutt wrote: >> Graeme Russ wrote: >>> OK, let's wind back - My original suggestion made no claim towards changing >>> what the API is used for, or how it looks to those who use it (for all >>> practical intents and purposes). I suggested: >>> - Removing set_timer() and reset_timer() >>> - Implement get_timer() as a platform independent function >> Why do you suggest removing set_timer() and reset_timer() ? >> > > Because if the timer API is done right, they are not needed To continue the wind back ... In several implementations, reset_timer() actually reloads or re-initializes the hardware timer. This has the effect of synchronizing get_timer() calls with subsequent interrupts. This prevents the early timeouts if the implementer chooses to use an interrupt rate less than 1 ms. So my original question was, how do we address this issue? --Scott