From mboxrd@z Thu Jan 1 00:00:00 1970 From: Graeme Russ Date: Wed, 25 May 2011 21:53:05 +1000 Subject: [U-Boot] [RFC] Review of U-Boot timer API In-Reply-To: <20110525113232.0F084CFB8A4@gemini.denx.de> 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> <20110524191948.401CBCF5DBF@gemini.denx.de> <20110525052541.F1708CF5DBF@gemini.denx.de> <20110525080603.AFE08CFB8A4@gemini.denx.de> <4DDCBD3D.4080409@gmail.com> <20110525113232.0F084CFB8A4@gemini.denx.de> Message-ID: <4DDCEDA1.2010101@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Wolfgang, On 25/05/11 21:32, Wolfgang Denk wrote: > Dear Graeme Russ, > > In message <4DDCBD3D.4080409@gmail.com> you wrote: >> >>> I see two options: >>> >>> 1) either we can have some signal when the timer wrapes around (like >>> an interrupt); in this case it does not matter how big the counter >>> itself is, we just increment our own local 64 bit timestamp. >>> >>> 2) Alternatively, I could imagine we use a 64 bit container plus a >>> mask which specifiec how many bits are actually used - then we can >>> accommodate counters with any numbers of valid bits. >>> >> >> 3) Keep calling get_timer() (which you do when checking protocol time-outs) >> - This keeps kicking the prescaler > > We cannot guarantee for this, so this is not really an option. > You can when you are waiting for a timeout Regards, Graeme