From: Wolfgang Denk Date: Tue, 24 May 2011 21:09:54 +0200 Subject: [U-Boot] [RFC] Review of U-Boot timer API In-Reply-To: <4DDBCD69.9090408@comcast.net> References: <4DD7B245.5000008@gmail.com> <201105240024.26511.vapier@gentoo.org> <4DDB42B1.2010206@emk-elektronik.de> <4DDB4C1C.7030301@aribaud.net> <20110524141216.193A7D1CAC2@gemini.denx.de> <4DDBCD69.9090408@comcast.net> Message-ID: <20110524190954.3D990CF5DBF@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear "J. William Campbell", In message <4DDBCD69.9090408@comcast.net> you wrote: > > After really looking into this, I think I agree with Wolfgang > that using ms for a get_timer timebase is the best way to go. This > thinking is heavily influenced (in my case anyway) by the fact that in > the interrupt driven cases (and these are the ONLY fully compliant cases > ATM I think), the "cost" of using ms is 0, because that is the "native" > unit in which the timer ticks. This makes everything real simple. We > can, right today, produce an API that supports u32 get_time_ms(void) for > all CPUs in use. This would allow u32 get_timer(u32 base) to continue to > exist as-is. These implementations would still be technically "broken" > in the non-interrupt case, but they would work at least as well as they > presently do. In fact, they would operate better because they would all > use a single routine, not a bunch of different routines (some of which I > am pretty sure have errors). Wolfgang would need to accept the fact that > we are not yet "fixing" all the non-interrupt cases. This needs to be > done, but is a different problem (I hope). In the non-interrupt case I see this as you do, so this there will be no problems for me to "accept" this. Thanks! Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de You know that feeling when you're leaning back on a stool and it starts to tip over? Well, that's how I feel all the time. - Steven Wright